How mateusribeirocampos/dragenda works
Backend API (dragenda-api)
• Built with Node.js and Express.
• Contains a clear MVC-inspired separation: controllers (handling HTTP requests), services (business logic), repositories (data access), and middlewares (e.g., rate limiting).
• Manages a SQLite database for storing users, doctors, services, appointments, and admin data.
• Environment configuration is supported via .env files (with a sample provided).
Frontend Web (dragenda-web)
• Developed using React 18 and bundled with Vite.
• Contains routing, component libraries, and integration with the backend API for functions like appointment scheduling and login.
• Deployment details on Vercel are noted, with clear separation of components (Navigation, pages, error handling, etc.).
Mobile App (dragenda-mobile)
• Developed with React Native (powered by Expo) to ensure mobile-first responsiveness.
• Contains UI components like appointments, doctors, and services, alongside context and routes for handling authentication and navigation.
a. Main Components:
• API Server (Backend) that handles authentication, business logic, and database interactions.
• Database (SQLite) that stores users, doctors, services, appointments, and admin records.
• Web Client (Frontend) deployed on Vercel.
• Mobile Client (React Native) for Android/iOS devices.
• Auxiliary components like Auth Service (JWT-based authentication) and Security Middleware (rate limiter).
b. Relationships and Interactions:
• That the API interacts with the SQLite database.
• Authentication interactions (JWT token exchange and validation) between the API and the clients.
• External services like push notifications or third-party libraries if applicable (e.g., JWT, express-rate-limit).
c. Architectural Patterns and Design Principles:
• Adopt an MVC-inspired layered structure for the backend (controllers, services, repositories).
• Separation of concerns between client-side (React/Vite and React Native via Expo) and server-side.
• If needed, show how middleware (e.g., rate limiting) and utilities (e.g., token management) integrate into the overall processing pipeline.
• Cross-platform compatibility since both a web and mobile client are served.
d. Technologies and Frameworks:
• Backend: Node.js, Express, SQLite, JWT (authentication), additional security middlewares.
• Frontend: React, Vite, react-router-dom, axios.
• Mobile: React Native, Expo, react-navigation.
• For a full-stack application like this, visually separate the frontend (subdivide into mobile and web if space allows) and backend components.
• Data flow: Clients (Web & Mobile) → API → Database.
• Auxiliary services (security, authentication) that cross-cut the API layer.
• Use clear labels for each major component (e.g., "API Server (Node.js/Express)", "Frontend Web (React)", "Mobile App (React Native)", "Database (SQLite)").