- install
flask
- create simple
app.py
- show how to run app
- build some basic routes (with params)
- add
.env
file for simplicity (need to install python-dotenv) and.gitignore
- install
flask-sqlalchemy
- set up
models.py
with Dog class - install
flask-migrate
, setup alembic and SQLAlchemy- use a better file template (file_template = %%(year)04d-%%(month)02d-%%(day)02d_%%(hour)02d-%%(minute)02d-%%(second)02d_%%(rev)s_%%(slug)s)
- add the naming convention
- run
flask db init
,flask db migrate
,flask db upgrade
- add dogs and query dogs with flask shell
- write a seed script
- can optionally install
faker
- can optionally install
- create a /dogs route
- add serializer for Dog (install
sqlalchemy-serializer
) - demo POSTman
- create a /dogs/int:id route
- test for 404s
- allow POST to /dogs
- add DELETE
- add PATCH
- Make Dog name required (discuss
nullable
andunique
) - Create a custom constraint for age (cannot be neg)
- Add validation for name and age
- add Owner class
- add fk to Owner on Dog
- rewrite seed script
- tricky talk about when ids get added
- add relationship
- add serialize_rules
- add route for owners
- create a simple react app with vite
- run
npm create vite@latest
- run
npm react-router-dom
- run
- set up a fetch
- add CORS
- set up form POST (with error handling)
- install bcrypt
- create a User class
- setup password column with encryption
- create login/signup/logout routes (don't forget secret key)
- create check session route
- use check session in react app