This is the Orbit project, a cognitive productivity system that adapts to your mental state and energy levels.
- Adaptive Interface: Changes based on your current mode (Build/Flow/Restore)
- Contextual Messaging: Intelligent, situation-aware assistant responses
- Task Management: AI-assisted task breakdown and prioritization
- Reflection Tracking: Log your mood and energy levels
- Responsive Design: Works on desktop and mobile devices
/client: Frontend React application (Vite + TypeScript + TailwindCSS)/server: Backend server (Node.js + Express)/contextual: Contextual message generation system/prisma: Database schema and migrations/routes: API endpoints
/prisma: Database schema and migrations
The application includes a sophisticated contextual message system that generates appropriate responses based on user actions and system events. See the Contextual Message System Documentation for details.
Trigger messages by sending a POST request to /api/contextual-message.
Example Payloads:
{
"trigger": "mode_change",
"context": { "mode": "flow" }
}
{
"trigger": "energy_low",
"context": { "energy": 25 }
}
{
"trigger": "chat_opened",
"context": { "timeOfDay": "evening" }
}Available Triggers:
mode_change: When the user changes their mode (build/flow/restore)energy_low: When the system detects low user energyreflection_logged: When a user logs a reflectionno_task: When there are no active taskschat_opened: When the chat interface is opened
This is the Orbit project, set up for local development.
To run this project locally, follow these steps:
-
Clone the repository (if you haven't already).
-
Install dependencies:
npm install
-
Set up Environment Variables:
- Copy the
.env.examplefile to a new file named.env:cp .env.example .env
- Open the
.envfile and fill in the required environment variables:DATABASE_URL: Your PostgreSQL connection string. The project was originally configured for Neon (a serverless Postgres provider), but any standard PostgreSQL instance should work. Example:postgresql://user:password@host:port/databaseOPENAI_API_KEY: Your API key for OpenAI services.
- Copy the
-
Database Migrations (After setting
DATABASE_URL): The project uses Drizzle ORM. To apply database schema migrations, run:npm run db:push
Note: You may need to ensure your database is running and accessible before this step.
-
Run the Development Server:
npm run dev
- This command starts both the backend Express server and the frontend Vite development server.
- The server starts on port 5001 (check console output). The Vite client will likely be on a different port (e.g., 5173) and proxy requests to the backend.
- Open your browser and navigate to the client URL provided in the console (usually
http://localhost:5173or similar).
-
Access the application: Open your browser and navigate to the client URL provided in the console (usually
http://localhost:5173or similar).