How karankumar-97/gigverse works
Main Components
• Frontend Client: This is the React application residing in the "frontend" directory. It is responsible for handling the UI, user interactions (such as gig browsing, messaging, order management, and payment flows) and state management (using libraries like React Query and Zustand).
• Backend Server: Located in the "backend" folder, this uses Node.js and Express. It is structured with controllers, models, routes, and middleware (like JWT for authentication). Each controller (auth, conversation, gig, message, order, payment, review, user) handles a specific domain of functionality.
• Database: Although not seen in the file tree, the README mentions MongoDB. This database stores data for users, gigs, orders, reviews, etc.
• External Services: Consider external services such as a payment gateway (as evident from the "payment.controller.js" and "payment.model.js") and possibly image storage or third-party API endpoints (such as file uploads).
Relationships and Interactions
• User authentication flow (login, registration) to emphasize the secure handling of user sessions using JWT tokens.
Architectural Patterns and Design Elements
• RESTful API Architecture: Different routes (auth, gig, message, etc.) each map to corresponding controllers.
• MVC (Model-View-Controller) Pattern in the Backend:
• Models (in “backend/models”) define the data structure.
• Controllers (in “backend/controllers”) handle the business logic.
• Routes (in “backend/routes”) define the API endpoints.
• Frontend’s component-based structure: Segregate pages and reusable components (e.g., Navbar, Footer, GigCard) which interact with the backend.
Relevant Technologies, Frameworks, and Libraries
• Frontend: React (with pages and components), Tailwind CSS, Vite for bundling, React Query for data fetching, Zustand for state management.
• Backend: Express.js for API building, JWT for authentication, bcrypt for security, and Node.js for runtime.
• Database: MongoDB (implied via the MERN stack).
• Additional Deployment: Vercel configuration files (for both frontend and backend).
Putting It All Together
• Middleware (such as "JWT Authentication") as an overlapped layer in the backend flow.
• Respective controllers/models to a "MongoDB Database" block that stores relevant data.
• Optionally, add an "External Payment Service" block linked to the "Payment Controller" to indicate third-party integrations.
• Interactions (e.g., Gig creation, order processing, messaging, filtering/searching gigs) are represented to capture the full scope of the platform’s functionalities.