How owengretzinger/hackmate works
Main System Components
a. Client Layer:
• Next.js Frontend (located in /src/app)
• Key pages: inspiration, pitch, readme, projects, architecture
• UI Components (in /src/components)
b. API Layer:
• tRPC API routes (/src/server/api/routers)
• NextAuth authentication endpoints
• API handlers for different features
c. Server Layer:
• tRPC server implementation
• Authentication services
• Database operations
d. External Services:
• Google Cloud Vertex AI
• Google Authentication
• Database (likely PostgreSQL based on Drizzle ORM usage)
[Client Layer]
• ↕
[API Layer]
• ↕
[Server Layer]
• ↕
[External Services]
Component Relationships
Key interactions:
a. Frontend to API:
• tRPC queries/mutations for:
• Project inspiration (/routers/inspiration.ts)
• README generation (/routers/readme.ts)
• Pitch creation (/routers/pitch.ts)
• User projects (/routers/user-projects.ts)
b. Authentication Flow:
• NextAuth integration with Google
• Session management
• Protected routes
c. AI Integration:
• Vertex AI service connections
• AI response processing
• Template management
Technical Details
Implementation specifics:
a. Database Schema:
• Drizzle ORM models (/server/db/schema.ts)
• Relationships between entities
b. API Routes:
• tRPC router configuration
• Authentication endpoints
• Protected vs public routes
c. AI Services:
• Vertex AI integration points
• Template processing
• Response handling
Notes for Implementation
• Clear labels for all components
• Both synchronous and asynchronous operations
• Security boundaries
• Scalable components