How dexter-ifti/streaker works
Main Components
• Frontend: Found in the "frontend" directory, this React.js application is responsible for the user interface. It includes components, pages, hooks, utility functions, styling (Tailwind CSS), and configuration files (Vite, Tailwind, etc.).
• Backend: The "streaker-backend" directory holds a Node.js application built using Hono.js. It is responsible for server-side logic including user authentication, activities, feedback, and other business logic. It follows an MVC-like or layered architecture with clearly separated controllers, services, models, and routes.
• Shared/Common Code: The "common" directory likely contains shared code or utilities that might be used across both the frontend and backend.
• Database: The project uses PostgreSQL accessed via Prisma ORM. The numerous migration files and the schema.prisma indicate a robust database setup.
• External Services: Elements like authentication (JWT), and possibly external deployments (Netlify for the frontend, Vercel/Netlify config files) should be illustrated as part of the overall ecosystem.
Relationships and Interactions
• Common/shared utilities could be placed as a centralized block that both frontend and backend might reference.
• Additionally, indicate external dependencies (such as authentication mechanisms using JWT), which might be integrated at the backend.
Architectural Patterns & Design Principles
• Separation of Concerns: Emphasize the strict separation between the client-side (React) and server-side (Hono.js/Node).
• Modular Structure: The backend directory is clearly modularized into controllers, routes, services, and middleware. Similarly, the frontend’s clear folder structure for components, pages, hooks, etc., can be highlighted.
• API-Driven Interaction: Show that the frontend communicates with backend endpoints for data operations like tracking activities, user authentication, and feedback submission.
• Frontend: React.js, Vite for bundling, Tailwind CSS for styling.
• Backend: Node.js with Hono.js, JWT-based authentication, and middleware for request handling.
• Database: PostgreSQL coupled with Prisma ORM.
• DevOps/Environment: Deployment configurations are indicated (netlify.toml for frontend, wrangler for backend, environment variable support).
Elements
• Clear labels: Each component (Frontend, Backend, Database, Common/Shared Code) should be clearly labeled.