Transform your sleep into art.
nocturn/
├── backend/ # Python FastAPI backend
│ ├── app/
│ │ ├── main.py # API entry point
│ │ ├── config.py # Configuration
│ │ └── providers/ # Oura, Whoop, Apple Health integrations
│ ├── requirements.txt
│ └── .env.example
└── frontend/ # Next.js frontend (coming soon)
cd backend
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtcp .env.example .env
# Edit .env with your API credentialsuvicorn app.main:app --reload --port 8000Visit http://localhost:8000 to verify it's running.
- Go to https://cloud.ouraring.com/oauth/applications
- Sign in with your Oura account
- Click "Create New Application"
- Fill in:
- Application Name: Nocturn
- Description: Transform sleep data into art
- Redirect URI:
http://localhost:8000/auth/oura/callback
- Save the Client ID and Client Secret to your
.envfile
Scopes needed: personal, daily, sleep, heartrate
- Go to https://developer-dashboard.whoop.com
- Sign in with your Whoop account
- Create a Team (if you haven't already)
- Click "Create App"
- Fill in:
- App Name: Nocturn
- Redirect URIs:
http://localhost:8000/auth/whoop/callback - Scopes: Select all read scopes:
read:sleepread:recoveryread:cyclesread:profileread:body_measurement
- Save the Client ID and Client Secret to your
.envfile
GET /auth/oura/login- Start Oura OAuth flowGET /auth/oura/callback- Oura OAuth callbackGET /auth/whoop/login- Start Whoop OAuth flowGET /auth/whoop/callback- Whoop OAuth callback
GET /sleep/nights- List available nightsGET /sleep/night/{date}- Get single night's data
POST /generate/interpret- Interpret sleep dataPOST /generate/image- Generate art from interpretation
- Backend: Python, FastAPI, Supabase
- Frontend: Next.js, TypeScript, Tailwind (coming)
- AI: Claude (interpretation), DALL-E/SDXL (image generation)
- 3D: TBD (Meshy, Tripo, or similar)