The secure, cloud-powered backend for the TrackIt mobile application. Built with Django and PostgreSQL, featuring field-level encryption and robust data isolation.
- User Authentication: Secure JWT-based auth via SimpleJWT.
- Data Privacy: Sensitive fields (Amounts, Descriptions, Weights, Notes) are encrypted at the database level using Fernet (AES-128).
- Multi-User Isolation: Automatic filtering ensures users only access their own records.
- Finance Tracking: REST API for managing expenses with categorical analysis.
- Fitness Tracking: Support for workouts, exercises, and set data with nested serialization.
- Reliable Static Serving: Integrated with WhiteNoise for efficient asset management.
- Framework: Django 6.0 + Django REST Framework
- Database: PostgreSQL
- Security: Fernet (Encryption), SimpleJWT (Auth)
- Deployment Ready: WhiteNoise, Gunicorn compatible, .env configuration
# Navigate to project
cd trackit_backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtCreate a .env file in the root directory:
DEBUG=True
SECRET_KEY=your_django_secret_key
DATABASE_URL=postgres://user:password@localhost:5432/trackit_db
ENCRYPTION_KEY=your_32_byte_base64_key
SALT_KEY=your_random_saltpython manage.py migrate
python manage.py collectstatic --noinput
python manage.py createsuperuserpython manage.py runserverPOST /api/auth/register/- Register new userPOST /api/token/- Get JWT tokensPOST /api/token/refresh/- Refresh access token
GET /api/finance/expenses/- List expensesPOST /api/finance/expenses/- Create expensePUT/DELETE /api/finance/expenses/{id}/- Update/Delete expense
GET /api/fitness/workouts/- List workouts (nested with exercises/sets)POST /api/fitness/workouts/- Create workout (supports nested creation)GET /api/fitness/routines/- List training routines
This project uses django-fernet-encrypted-fields. Even a database administrator cannot view sensitive values without the ENCRYPTION_KEY. Ensure your .env file is never committed to version control.
Built by Walker 🤖