Prerequisites
Before you begin, ensure you have the following installed:Bun
Package manager (v1.2.21 or later)
PostgreSQL
Database server (v14 or later)
Node.js
Required for React Native (v18 or later)
If you don’t have Bun installed, see our Installation Guide for setup instructions.
Quick Setup
Install dependencies
Install all dependencies for both web and mobile apps using Bun:This installs dependencies for:
- The web application (
apps/web) - The mobile application (
apps/native) - All shared packages
The project uses Bun’s workspace feature to manage the monorepo. All dependencies are installed from the root.
Set up environment variables
Create a Add the following required environment variables:
.env file in the root directory (not in apps/web/.env):.env
Where to get API keys
Where to get API keys
- Anthropic API Key: Sign up at console.anthropic.com
- OpenAI API Key: Get one from platform.openai.com
- Upstash: Create a free account at upstash.com and set up a Search index
- AUTH_SECRET: Generate with
openssl rand -base64 32in your terminal
Initialize the database
Push the database schema to your PostgreSQL instance:This command:
- Connects to your PostgreSQL database using
DATABASE_URL - Creates all necessary tables (users, sessions, todos, study sets, memory)
- Sets up foreign key relationships
Optional: View your database
Optional: View your database
You can explore your database schema using Drizzle Studio:This opens a visual database browser at
http://localhost:4983.Start the development servers
Start the web application:The web app will be available at http://localhost:3000.For mobile development, the Expo dev server will start and you can:
- Scan the QR code with the Expo Go app (iOS/Android)
- Press
ifor iOS simulator - Press
afor Android emulator
Create your first account
Navigate to
http://localhost:3000 in your browser:- Click Sign Up to create a new account
- Enter your name, email, and password
- Verify your email (if email verification is enabled)
- You’ll be redirected to the dashboard
The first user you create will have access to all features. You can add Canvas LMS credentials in your account settings.
Start your first AI chat
Once logged in:
- Click New Chat or navigate to the chat interface
- Try asking the AI assistant questions like:
- “What can you help me with?”
- “Search for information about photosynthesis”
- “Calculate the derivative of x^2 + 3x”
- Explore the AI’s capabilities including web search, code execution, and memory
- Web search for current information
- Code execution for calculations and analysis
- Memory to remember your preferences
- Canvas integration (once you connect your account)
- Todo management and study set creation
Verification
To verify your setup is working correctly:Check the web app
Check the web app
Visit
http://localhost:3000 and ensure:- The page loads without errors
- You can create an account
- The AI chat interface is accessible
Check the database connection
Check the database connection
Run this command to open Drizzle Studio:You should see your database tables and the user you created.
Check the AI chat
Check the AI chat
Send a message to the AI assistant. You should see:
- Streaming responses (words appear one by one)
- The AI can use tools (try asking it to search the web)
- Responses are relevant and contextual
Next Steps
Now that you have Maxw AI running, explore these features:Connect Canvas LMS
Import your courses and assignments
Explore AI Features
Learn about all AI capabilities
Manage Tasks
Create and organize your todos
Create Study Sets
Generate flashcards for studying
Troubleshooting
Database connection errors
Database connection errors
If you see database connection errors:
- Verify PostgreSQL is running:
pg_isready - Check your
DATABASE_URLformat:postgresql://user:password@host:port/database - Ensure the database exists:
createdb maxw_ai - Verify credentials are correct
Bun command not found
Bun command not found
If
bun is not recognized:- Install Bun:
curl -fsSL https://bun.sh/install | bash - Restart your terminal
- Verify installation:
bun --version
AI chat not responding
AI chat not responding
If the AI chat doesn’t respond:
- Check your
ANTHROPIC_API_KEYis valid - Verify you have API credits remaining
- Check browser console for errors (F12)
- Check server logs for detailed error messages
Port 3000 already in use
Port 3000 already in use
If port 3000 is already in use:
- Kill the process using port 3000:
lsof -ti:3000 | xargs kill -9 - Or specify a different port:
PORT=3001 bun dev:web
For detailed installation instructions and production setup, see our Installation Guide.