Django/React/PostgreSQL project
django username: root django password: password dont know if consistant for docker or not but its here.
Backend is entirely dockerized, might to to stop docker and run again on first build. database sometimes builds slower than web even though web depends on database
10 points are awarded uppon completion of a todo, all todos are worth the same. points are removed on uncompletion. leaderboard shows users who have completed the most tasks.
- start by navigating to gamify_todo_frontend
- run
npm installand thennpm run build - navigate to gamify_todo
- might have to run
docker-compose run web python manage.py makemigrationsand thendocker-compose run web python manage.py migrateon first run
- run
docker-compose up --build
- first build might fail to connect to database as it takes a bit to initialize, just restart docker and run the command again and it will work
- open webbrowser to localhost:8000
docker-compose up --builddocker-compose run web python manage.py [manage.py commands]npm run build- base todo list
- starting a django project with postgres
- CRUD in Django Rest Framework and React
- postgres commands
- session based Auth
- django ModelViewSet docs
- dont write your own auth from scratch use a library maybe try Auth0 for react next time. or in the future. Could also use react auth kit first time mulligan I guess?
- ask more questions! how should I gamify this, right now every task is worth 10 points.
- made some guesses on gamification as well. Ask sooner not later.
- dont let the backend suffer because you cant figure out front end... it should be better than it is.
- routes aren't protected, you will just get unuseable access to them. /dashboard and /todo
- registration sends plain text passwords.
- axios requests could be updated to use .then/.catch methods instead of nesting them in a try/catch
- most of the bodies of the backend are wrapped in try catch, (account/userprofile apps) not sure how I feel about that.
- there are no real rewards. In the future I could do avatars that unlock with points earned or something along those lines.
- using alerts for notifications.
- docker shoud be able to run whole thing, shoudnt need to restart after first run because database is slow to create.
- all tasks are worth the same.
- no notifications for tasks near due date.
- due dates are entirely pointless at the moment, it would be nice to tie points to how far from due date in future.
- userprofile endpoints arent super restful, it would be better if it was {base}/profile/{user_id}
- mobile interface for todo's isnt perfect.