How rk-41/evento works
Main Components
• Frontend Client:
• Built with React, utilizing TypeScript.
• Contains UI components (e.g., HomePage, Navbar, Auth, Event related components, Profile) that manage pages and interactions.
• Uses React Router for navigation and Axios for API calls.
• Integrates Socket.IO Client for real-time event updates.
• Communicates with the backend via REST API endpoints and WebSockets.
• Backend API Server:
• Built with Node.js, Express, and TypeScript.
• Contains configuration files (database setup with Mongoose, express config, and Socket.IO configuration).
• Handles authentication (JWT based) and authorization.
• Organizes routes into controllers and API endpoints (auth, events, users).
• Manages real-time events using Socket.IO (with event handlers).
• Implements middleware for authentication.
• Database:
• MongoDB is used via Mongoose, storing user and event data.
• External Services:
• Cloudinary is used for image uploads.
• Deployment platforms: Vercel for the frontend and Railway for the backend.
Relationships and Interactions
• Frontend, acting as the client, sending HTTP requests to the Backend’s REST API for authentication and CRUD operations related to events and users.
• The frontend’s Socket.IO Client connecting with the backend Socket.IO server to receive live updates and push real-time event notifications.
• Backend controllers interacting with the Database (MongoDB) via Mongoose models (for User and Event).
• The backend interacting with external services like Cloudinary for image management.
Architectural Patterns & Design Principles
• Separation of Concerns:
• The project is divided into clear frontend and backend modules.
• In the backend, configuration, routes, models, controllers, and middleware are separated into distinct directories.
• Real-Time Communication:
• The implementation of Socket.IO both on the client and server sides indicates a publish-subscribe model where events are emitted and listened to in real-time.
• API Layer and Authentication:
• RESTful API endpoints are clearly defined in the routes and controllers, with authentication handled via JWT tokens on secured endpoints.
Relevant Technologies, Frameworks, and Libraries
• Frontend: React, TypeScript, Vite, Axios, React Router, Socket.IO Client, Cloudinary, Framer Motion, and TailwindCSS.
• Backend: Node.js, Express, TypeScript, Mongoose (for MongoDB), Socket.IO Server, and JWT for secure authentication.