Onboarding Guide
Welcome to the Tutor Nexus team! This guide will help you get started.
Before You Begin
Required Accounts
| Service | Purpose | Sign Up |
|---|---|---|
| GitHub | Code repository | github.com/signup |
| Cloudflare | Infrastructure | cloudflare.com |
Required Software
- Node.js 20+
- pnpm 9+
- Git
- VS Code (recommended)
- Docker (optional, for Go development)
Day 1: Setup
1. Clone and Install
# Clone the repository
git clone https://github.com/tutor-nexus/tutornexus.git
cd tutornexus
# Install pnpm if needed
npm install -g pnpm
# Install all dependencies
pnpm install
2. Configure Environment
# Copy environment template
cp .env.example .env
# Edit with your values
nano .env
Required variables:
AUTH_SECRET- Generate withopenssl rand -hex 32CLOUDFLARE_API_TOKEN- Create in Cloudflare dashboardGOOGLE_CLIENT_ID/SECRET- For OAuth (optional initially)
3. Set Up Cloudflare
# Login to Wrangler
npx wrangler login
# Verify access
npx wrangler whoami
4. Verify Setup
# Run the development server
pnpm dev
# Visit http://localhost:8787/health
# Should return {"status":"healthy"}
Understanding the Architecture
Core Concepts
- Workers - Edge functions handling API requests
- D1 - SQLite databases at the edge
- Durable Objects - Real-time state management
- Queues - Async job processing
- R2 - Object storage for artifacts
Data Flow
User → Cloudflare CDN → Workers API → D1 Database
↓
Vectorize (RAG)
↓
MCP Server (Go)
Key Files
| Path | Purpose |
|---|---|
apps/api/src/index.ts | API entry point |
apps/api/src/routes/ | API route handlers |
d1/migrations/ | Database schema |
docs/adr/ | Architecture decisions |
Your First Task
Good First Issues
Look for issues labeled:
good first issuehelp wanteddocumentation
Making Changes
-
Create a branch
git checkout -b feature/your-feature-name -
Make your changes
# Edit files as needed
code . -
Run tests
pnpm test
pnpm lint -
Commit
git add .
git commit -m "feat(api): add your feature" -
Push and PR
git push origin feature/your-feature-name
# Open PR from GitHub UI
Development Workflow
Daily Routine
# Start the day
git checkout main
git pull
# Create or switch to your branch
git checkout feature/your-task
# Make changes
# ...
# Run tests
pnpm test
# Commit
git add -A
git commit -m "feat(scope): description"
# Push
git push origin feature/your-task
Code Review
- Keep PRs small (< 400 lines ideally)
- Write clear descriptions
- Self-review before requesting
- Address feedback promptly
Communication
- Discord: Team channels for discussion
- GitHub Issues: Feature requests and bugs
- PR Comments: Technical discussions
Learning Resources
Internal
External
FAQ
Q: Where do I find the database schema?
See d1/migrations/ for all database schemas.
Q: How do I add a new API endpoint?
- Define Zod schema in
apps/api/src/schemas/ - Create route in
apps/api/src/routes/ - Register in
apps/api/src/index.ts - Add tests
Q: How do I run just the API?
pnpm dev:api
Q: How do I test changes to the database?
# Apply migrations locally
pnpm db:migrate
# Open database console
pnpm db:console
Q: Where are environment variables used?
- API routes:
c.get('env').VARIABLE_NAME - Wrangler: Defined in
wrangler.tomlor secrets
Getting Help
- Check docs - Start with documentation
- Search issues - Similar problems may exist
- Ask in Discord - Team members can help
- Create issue - Document the problem
Next Steps
After onboarding:
- Set up development environment
- Review key ADRs
- Make first contribution
- Join code review rotation
- Participate in doc sprints
Welcome aboard! 🎉