This commit includes: - Django backend with multi-tenancy (django-tenants) - React + TypeScript frontend with Vite - Platform administration API with role-based access control - Authentication system with token-based auth - Quick login dev tools for testing different user roles - CORS and CSRF configuration for local development - Docker development environment setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
89 lines
3.0 KiB
Markdown
89 lines
3.0 KiB
Markdown
# Smooth Schedule
|
|
|
|
Multi-Tenant SaaS Resource Orchestration Platform
|
|
|
|
[](https://github.com/cookiecutter/cookiecutter-django/)
|
|
[](https://github.com/astral-sh/ruff)
|
|
|
|
License: MIT
|
|
|
|
## Settings
|
|
|
|
Moved to [settings](https://cookiecutter-django.readthedocs.io/en/latest/1-getting-started/settings.html).
|
|
|
|
## Basic Commands
|
|
|
|
### Setting Up Your Users
|
|
|
|
- To create a **normal user account**, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.
|
|
|
|
- To create a **superuser account**, use this command:
|
|
|
|
uv run python manage.py createsuperuser
|
|
|
|
For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.
|
|
|
|
### Type checks
|
|
|
|
Running type checks with mypy:
|
|
|
|
uv run mypy smoothschedule
|
|
|
|
### Test coverage
|
|
|
|
To run the tests, check your test coverage, and generate an HTML coverage report:
|
|
|
|
uv run coverage run -m pytest
|
|
uv run coverage html
|
|
uv run open htmlcov/index.html
|
|
|
|
#### Running tests with pytest
|
|
|
|
uv run pytest
|
|
|
|
### Live reloading and Sass CSS compilation
|
|
|
|
Moved to [Live reloading and SASS compilation](https://cookiecutter-django.readthedocs.io/en/latest/2-local-development/developing-locally.html#using-webpack-or-gulp).
|
|
|
|
### Celery
|
|
|
|
This app comes with Celery.
|
|
|
|
To run a celery worker:
|
|
|
|
```bash
|
|
cd smoothschedule
|
|
uv run celery -A config.celery_app worker -l info
|
|
```
|
|
|
|
Please note: For Celery's import magic to work, it is important _where_ the celery commands are run. If you are in the same folder with _manage.py_, you should be right.
|
|
|
|
To run [periodic tasks](https://docs.celeryq.dev/en/stable/userguide/periodic-tasks.html), you'll need to start the celery beat scheduler service. You can start it as a standalone process:
|
|
|
|
```bash
|
|
cd smoothschedule
|
|
uv run celery -A config.celery_app beat
|
|
```
|
|
|
|
or you can embed the beat service inside a worker with the `-B` option (not recommended for production use):
|
|
|
|
```bash
|
|
cd smoothschedule
|
|
uv run celery -A config.celery_app worker -B -l info
|
|
```
|
|
|
|
### Sentry
|
|
|
|
Sentry is an error logging aggregator service. You can sign up for a free account at <https://sentry.io/signup/?code=cookiecutter> or download and host it yourself.
|
|
The system is set up with reasonable defaults, including 404 logging and integration with the WSGI application.
|
|
|
|
You must set the DSN url in production.
|
|
|
|
## Deployment
|
|
|
|
The following details how to deploy this application.
|
|
|
|
### Docker
|
|
|
|
See detailed [cookiecutter-django Docker documentation](https://cookiecutter-django.readthedocs.io/en/latest/3-deployment/deployment-with-docker.html).
|