How codeyourfuture/tech-products-demo works
Main Components
a. Client-Side (Frontend):
• Components Layer (Button, Form, Header, etc.)
• Pages Layer (Home, About, Account, etc.)
• Services Layer (resourceService, topicService)
• State Management (authContext)
• Styles (SCSS modules)
b. Server-Side (Backend):
• API Routes Layer
• Controllers Layer (auth, resources, topics, users)
• Services Layer
• Repositories Layer
• Middleware
• Utils (config, logger)
c. Database:
• Resources
• Users
• Topics
• Auth-related tables
d. External Services:
• "GitStub" (mock GitHub OAuth/API) container
• Authentication flow connections
Component Relationships
• Frontend → Backend (HTTP/API calls)
• Backend → Database (queries/operations)
• Frontend ↔ GitStub (OAuth flow)
• Backend ↔ GitStub (API interactions)
Technical Stack Details
• Frontend: React, Vite, SCSS
• Backend: Express.js, Node.js
• Database: PostgreSQL
• Testing: Jest, Cypress
• DevOps: Docker, GitHub Actions
Architecture Patterns to Highlight
• MVC pattern in the backend:
• Controllers (resourcesController, etc.)
• Services (businessLogic)
• Repositories (data access)
• Component-based architecture in frontend:
• Shared components
• Page components
• Custom hooks
• Services
Infrastructure Components
Containers for:
• Docker environment
• Development tools (migrations, scripts)
• CI/CD pipeline (GitHub Actions)
Additional Details
Annotations for:
• Port mappings (4201, 4202, 4211, 4212)
• Development/Production modes
• API documentation endpoint
• Migration flows
For this specific project, emphasize the separation between the client and server applications, the database schema evolution through migrations, and the authentication flow with the mock GitHub service (GitStub).