Skip to content

Our Code Structure

Evan Ugarte edited this page Mar 11, 2020 · 17 revisions

Architecture Diagram

sce-architecture

User

React Components

  • Anything that has it's own webpage can be found in src/Pages/
  • Anything that is used across webpages can be found in src/Components/

Connecting React Components to the Backend

  • React components call on functions defined in src/APIFunctions which then send requests to the API endpoints.
  • This abstracts axios POST and GET requests

SCE Web Server

MongoDB

  • MongoDB models for our data is located in api/models

API Endpoints

RPC Server

Example Workflow

  1. Write an API Endpoint.
  2. Create a function that can call on this endpoint located in src/APIFunctions.
  3. You can now import this function in your React component and call on it.
Clone this wiki locally