How csci-499-sp23/team-2-sp23 works
Project’s Core Components
• Client: The “client” directory contains a React-based frontend. Look for typical React layers such as components, hooks, pages, assets, and a state management structure (Redux or similar via “store”). Firebase files (e.g., firebase.json, .firebaserc) indicate that the client is deployed via Firebase Hosting.
• Server: The “server” directory is a Node.js/TypeScript backend. It includes controllers, models, routes, services, configuration constants, and even a suite of tests. Notably, there is a strong emphasis on API routes (for restaurants, users, preferences) and jobs. There are also specialized integrations such as “yelp-services” that likely deal with scraping or interfacing with Yelp for restaurant data.
• Database: The README mentions a MongoDB connection string configured in the server’s .env file, so consider this as an external component in your architecture.
• External Services: Additionally, the existence of “yelp-services” in the server directory suggests integration with external APIs or web scraping for restaurant data.
Relationships and Data Flows
• The frontend (client) communicates with the backend through REST API endpoints (or similar) defined by the controllers and routes in the server directory.
• Server components (controllers, services, models) interact with a MongoDB database to store and retrieve data.
• The server might also have scheduled jobs (in the “jobs” folder) that process or update data automatically (e.g., scraping coordinates or cleaning up old menus).
• External integrations (e.g., Yelp, as seen in the “yelp-services”) interact with the server to provide additional data or functionality.
Architectural Patterns
• Client: The use of React with modular components (pages, hooks, assets, store) suggests a component-based UI architecture with clear separation of concerns (UI rendering, API interactions, state management).
• Server: The structure is indicative of an MVC-like pattern:
• Routes define API endpoints.
• Controllers handle business logic.
• Models represent the data structure (food, restaurant, user, etc.).
• Services encapsulate the core business operations (food, menu, restaurant operations).
• Additionally, the presence of a “jobs” folder suggests a background task processing mechanism.
• Testing is emphasized in both client and server parts so consider a testing layer for unit and integration tests.
• On how the API endpoints and controllers in the server facilitate interactions between the client and the data storage.
• Testing aspect (like separate testing modules) if needed, to show the project’s stability and development practices.