Django RESTful SPA based on Vue.js and uses JWT
The project demonstrates the classic TODO list single-page application (SPA).
Front-end side based on the progressive JavaScript framework named Vue.js.
The authentication method implements JSON Web-Token (JWT) by default. Project has custom User model which combined with basic authentication.
Please visit the production version here https://alex-djangovue.herokuapp.com which was deployed on Heroku.
test username: django@django.dev
test password: 12345678
In order to run project to follow next steps:
-
Clone project and install virtual environment inside root directory:
python -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Then execute Django commands:
python manage.py makemigrations python manage.py migrate
-
Build client SPA:
npm install --prefix ./project/spa/static/spa npm run build --prefix ./project/spa/static/spa python manage.py collectstatic --noinput --link
-
Fill database a seed data (edit load_data.cfg for setting up custom values):
python manage.py load_data
Output >>
Cleaning database...
Got number_of_users: 5
Got max_projects_per_user: 5
Got max_tasks_per_user: 5
Got max_likes_per_user: 5
Wait...
Done. Created 5 users, 25 projects, 125 tasks.
Run application by python manage.py runserver 127.0.0.1:9000
Also, for using the email verifier add EMAIL_VERIFIER_API_KEY variable to local environment.