Giter Site home page Giter Site logo

recipe-website's Introduction

Recipe Website

Description

This site is a recipe site that has authentification/authorization and uses CRUD operations to manipulate user added data.

Prerequisites

Requires vagrant virtual machine Requires a client secrets file at flask-bones/client_secrets.json. And changes to data-clientid in app/auth/templates/components/google_login.html

Requires .env file at flask-bones/.env with contents:

export DATABASE_URL=postgresql://$USER@localhost/flask_bones > /dev/null
export SERVER_NAME=localhost:8000 > /dev/null
export MAILCATCHER_PORT_1025_TCP_ADDR=0.0.0.0 > /dev/null
export MAILCATCHER_PORT_1025_TCP_PORT=1025 > /dev/null
export REDIS_PORT_6379_TCP_ADDR=0.0.0.0 > /dev/null
export REDIS_PORT_6379_TCP_PORT=6379 > /dev/null
export MEMCACHED_PORT_11211_TCP_ADDR=0.0.0.0 > /dev/null
export MEMCACHED_PORT_11211_TCP_PORT=11211 > /dev/null
export DB_PORT_5432_TCP_ADDR=0.0.0.0 > /dev/null
export DB_PORT_5432_TCP_PORT=5432 > /dev/null
export MAIL_USERNAME= _______ > /dev/null
export MAIL_PASSWORD= _______ > /dev/null

Last 2 rows are empty as they require a real gmail adress with a app password.

Instalation and usage

Cd to $ cd /vagrant/*/ when connected with vagrant ssh. Postgresql database password needs to be set with sudo -u postgres psql then \password postgres to postgres

  1. Setup database and seed with test data:

    $ make db
    
  2. Run a local SMTP server:

    $ mailcatcher
    
  3. Run the celery worker: (note - Celery needs to be running in seperate windows from server)

    $ make celery
    
  4. Run local server:

    $ make server
    

File structure

Has folowing main folders:

  • flask-bones - Contains project
  • i18n - Translation file ---Not Used---
  • instance - Contains secret key file
  • migrations - ---Not Used---
  • app - Contains all files for the webpage
  • auth - Contains all views, templates, controllers and forms for login/logout
  • categories - Contains all views, templates, controllers and forms for Category CRUD operations
  • database - Contains init file for creating the database
  • recipes - Contains all views, templates, controllers and forms for Reecipe CRUD operations
  • static - Contains static content, like css, js etc.
  • templates - Contains main template and all modules and components for views.
  • user - Contains all views, templates, controllers and forms for User accaunt management
  • flask-bones/manag.py runs server, app/_init_.py initializes all needed data/extensions. app/config.py contains app configuration.
  • requirements.txt contains all library requirements for project. (It is important to not change versions)

Content is generated from index.html, uses main.html layout.

Built With

Project built with flask-bones

Future plans

Integrate multiple projects into this page.

Authors

  • Jānis Tidriķis - Initial work

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments and Thanks

Thanks to Billie Thompson for providing a nice readme template. Thanks to Corey Burmeister for making a flask mvc base/example.

recipe-website's People

Contributors

janist7 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.