This guide covers everything you need to set up Initialized for local development.
- Node.js 18+
- PostgreSQL database
- GitHub OAuth App credentials
git clone https://github.com/wbfoss/initialized.git
cd initializednpm installCreate a .env file in the root directory:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/initialized"
# Auth
AUTH_SECRET="your-secret-key-min-32-chars"
AUTH_GITHUB_ID="your-github-oauth-app-id"
AUTH_GITHUB_SECRET="your-github-oauth-app-secret"
# App
NEXTAUTH_URL="http://localhost:3000"npx prisma generate
npx prisma db pushnpm run devOpen http://localhost:3000 to see the app.
- Go to GitHub Developer Settings
- Click "New OAuth App"
- Fill in the application details:
- Application name:
Initialized(or your choice) - Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Application name:
- Click "Register application"
- Copy the Client ID
- Generate and copy a Client Secret
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build for production |
npm run start |
Start production server |
npm run test |
Run test suite |
npm run test:watch |
Run tests in watch mode |
npm run lint |
Run ESLint |
npm run format |
Format code with Prettier |
npm run seed |
Seed demo user data |
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| Database | PostgreSQL with Prisma 7 |
| 3D Graphics | Three.js / React Three Fiber |
| Authentication | NextAuth.js v5 |
| Styling | Tailwind CSS 4 |
| Validation | Zod |
| Testing | Vitest |
- Token Encryption: OAuth tokens encrypted using AES-256-GCM
- Input Validation: All API inputs validated with Zod schemas
- Rate Limiting:
- Stats refresh: 5 requests/hour
- Settings updates: 20 requests/minute
- Database Transactions: Atomic operations for data integrity
Ensure PostgreSQL is running and the DATABASE_URL is correct:
# Test connection
psql $DATABASE_URL -c "SELECT 1"- Verify your callback URL matches exactly:
http://localhost:3000/api/auth/callback/github - Ensure
NEXTAUTH_URLmatches your development URL
# Regenerate Prisma client
npx prisma generate
# Reset database (warning: deletes all data)
npx prisma db push --force-reset- Read the Architecture Guide to understand the codebase
- Check CONTRIBUTING.md for contribution guidelines