A beautiful, feature-rich personal companion web app built with Django.
| Module | Highlights |
|---|---|
| ๐ Notes | Folders, tags, pin, search, PDF export |
| ๐ Diary | Daily journal, mood tracking, streaks, PDF export |
| ๐ฏ Goals | AI-powered planning, Kanban tasks, progress charts |
| ๐ฎ Astrology | Birth chart (Kundli), 12 houses, Dasha periods, daily guidance |
| ๐ค AI Chat | Personal AI mentor (OpenAI-compatible / Gemini / Vertex AI) |
| ๐ Tangred | Agentic wardrobe AI with private photo sessions and Tan Studio styleboards |
| ๐ Location | Real-time GPS tracking with interactive map |
| ๐ Notifications | Firebase push notifications + diary reminders |
| ๐ Birthday | Countdown widget, confetti celebration |
| ๐ Dark Mode | System-aware toggle |
| ๐ฑ PWA | Installable, offline-capable |
- Python 3.11+
- PostgreSQL (production) or SQLite (development)
git clone https://github.com/flywithvvk/jp.git
cd jp
pip install -r requirements.txt
cp backend/.env.example backend/.env
# Edit backend/.env with your keys
python manage.py migrate
python manage.py createsuperuser
python manage.py collectstatic --noinput
python manage.py runserver| Variable | Description | Required |
|---|---|---|
SECRET_KEY |
Django secret key (required when DEBUG=False) |
Yes (prod) |
DATABASE_URL |
PostgreSQL connection string | Yes (prod) |
DEBUG |
Debug mode (False in production) |
No |
ALLOWED_HOSTS |
Comma-separated host allowlist | No |
CSRF_TRUSTED_ORIGIN(S) |
Extra CSRF origins (comma-separated) | No |
INITIAL_USERNAME / INITIAL_PASSWORD |
Bootstraps the first user on deploy (no-op if unset) | No |
LOG_TO_FILE |
Enable file logging (defaults off in prod; Railway fs is ephemeral) | No |
EMERGENT_PLATFORM |
Set to 1 to enable Emergent-platform ALLOWED_HOSTS/CSRF defaults |
No |
EMERGENT_API_KEY |
OpenAI-compatible AI provider key | No* |
GITHUB_MODELS_TOKEN |
GitHub Models inference token | No* |
GEMINI_API_KEY |
Google Gemini API key | No* |
VAPID_PUBLIC_KEY |
Web push notification key | No |
FIREBASE_PROJECT_ID |
Firebase project identifier | No |
* At least one AI provider is required for AI chat features.
jp/
โโโ core/ # Auth, dashboard, location tracking, middleware
โโโ notes/ # Notes with folders & tags
โโโ diary/ # Daily journal & mood tracking
โโโ goals/ # Goals & task management
โโโ astro/ # Vedic astrology engine
โโโ ai_chat/ # AI companion
โโโ templates/ # Django HTML templates
โโโ static/ # CSS, JS, icons, PWA manifest
โโโ backend/ # Server config & requirements
โโโ firebase-functions/ # Firebase Cloud Functions (proxy)
โโโ firebase-hosting/ # Firebase Hosting (redirect shell)
โโโ docs/ # Architecture & deployment guides
โโโ manage.py
- Backend: Django 4.2, Python 3.11, ASGI (Uvicorn)
- Database: PostgreSQL (prod) / SQLite (dev)
- AI: OpenAI-compatible, GitHub Models, Gemini, Vertex AI
- Wardrobe AI: OpenRouter + Stitch MCP, with durable in-app photo persistence
- Astrology: Swiss Ephemeris (pyswisseph)
- Frontend: Django Templates, Bootstrap 5, Chart.js, Leaflet.js
- Deployment: Railway (ASGI + Gunicorn), WhiteNoise, Firebase Hosting
- Security: HSTS, CSRF, XSS protection, SSL redirect, bleach sanitization
Deployed on Railway with auto-deploy from main branch.
The container entrypoint (entrypoint.sh) runs DB migrations before starting
Gunicorn, so traffic is never served against an unmigrated schema. Railway's
nixpacks build path is equivalent (see railway.json). Health probe:
GET /health โ returns 200 immediately without touching the DB.
# Local production-style run
docker build -t jayti .
docker run --rm -p 8001:8001 \
-e SECRET_KEY=$(python -c "import secrets;print(secrets.token_urlsafe(64))") \
-e DEBUG=False \
-e ALLOWED_HOSTS=localhost \
jaytiSee docs/DEPLOYMENT_GUIDE.md for full setup.
# Fast in-process smoke tests
DEBUG=True SECRET_KEY=dev LOG_TO_FILE=0 pytest tests -q --ignore=tests/e2e
# Django deploy check (what CI enforces)
DEBUG=False SECRET_KEY=<long-random> ALLOWED_HOSTS=example.com \
python manage.py check --deploy --fail-level WARNING
# Lint
ruff check .GitHub Actions (.github/workflows/ci.yml) runs on every push/PR:
lint โ tests โ Django deploy-check โ dependency audit.
Browser-based E2E tests live in tests/e2e/ and run against an in-process
Django server via pytest-django's live_server fixture.
pip install -r requirements-dev.txt
playwright install --with-deps chromium
pytest tests/e2e -m e2e -q # headless
pytest tests/e2e -m e2e --headed # headed, for debuggingCI workflow: .github/workflows/e2e.yml (Chromium, traces + screenshots
uploaded as artifacts on failure). See tests/e2e/README.md for details. An
optional Node/@playwright/test harness for codegen/trace UI ships in
e2e-node/ (not wired into CI).
Tangred session photos are served through authenticated Django endpoints.
- Primary path: Firebase Storage when a valid bucket is configured
- Safe fallback: PostgreSQL-backed binary storage for private in-app persistence
- Optional override:
TANGRED_PRIVATE_MEDIA_BACKEND=database|firebase|local
This means Tangred wardrobe photos remain available across Railway deploys even when object storage is unavailable.
This project is a personal gift and is not licensed for redistribution.
Made with ๐