Simple Todo app with login/register
- Template to init Django and Django-Ninja serving ReactJS via InertiaJS
- Includes simple register/signup with session-based django_auth
- Uses
@hey-api/openapi-tsto generate client for frontend based on OpenAPI schema - Uses React-Query on the frontend which uses the generated clients
- Clone this repo
- Backend setup
- Dependencies are in pyproject.toml. Install using
poetryoruv - Edit the settings.py file with your DB credentials
- Run
poetry run python manage.py migrateoruv run python manage.py migrateto run migrations - Run the server with
poetry run python manage.py runserveroruv run python manage.py runserverdepending on what you use - Visit http://localhost:8000/api/docs for the Django-Ninja OpenAPI playground
- Dependencies are in pyproject.toml. Install using
- Frontend setup
- Go to
./frontenddirectory - Run
npm install - Run
npm run typegento generate the client calls from the OpenAPI schema(make sure django server is running) - Run
npm run dev
- Go to
- Visit http://localhost:8000 to see a simple Login/Register page with Todo app tied to the backend and DB
- Django: https://www.djangoproject.com/
- Django Ninja: https://django-ninja.dev/
- inertia-django: https://github.com/inertiajs/inertia-django
- InertiaJS: https://inertiajs.com/
- ReactJS: https://react.dev/
- Add common logging module
- Fix frontend tests
- Add SSR for backend
- Add DockerFile
- Cleanup setting csrf token in headers
- Set OpenAPI labels to different routes