Skip to content

Architecture

Jacob Robertson edited this page Oct 18, 2024 · 78 revisions

Backend

The backend will be a Python API running in a Docker container that will access the MongoDB database.

Libraries and frameworks

  • Pip
    • Package manager for Python
    • Requirements kept in requirements.txt
  • Flask
  • PyMongo
    • Python API for MongoDB
  • Hashlib
    • Hashes passwords when authenticating for better security

API endpoints

Database

  • We will be using MongoDB as our database.

User Collection

**This collection will hold all information regarding the user and their account. **

  • _id - the ID of the user, UUID generated by MongoDB: UUID
  • name - name of the user: String
  • username - username of the user: String
  • password - password for the user: String
  • bio - description the user can create: String
  • privacy_settings - object containing user privacy preferences:
    • default_event_visibility - the default visibility of the user’s events: String (values: "public", "private")
  • followers - array of objects containing details about each follower:
    • follower_id - the ID of the follower: UUID
  • following - array of objects containing details about each user the current user is following:
    • following_id - the ID of the following: UUID

An example user object and how it would be stored in the database.

{
   "_id": "603d2149e2f8b9023d4a1f34",
   "name": "Hugh Gevent",
   "username": "hughgevent_",
   "password": "coffelovr44"
   "bio": "coffee lover",
   "privacy_settings": {
      "default_event_visibility": "public"
   },
   "followers": [
      {
         "follower_id": "603d2149e2f8b9023d4a1f35"
      },
      {
         "follower_id": "603d2149e2f8b9023d4a1f36"
      }
   ],
   "following": [
      {
         "following_id": "603d2149e2f8b9023d4a1f37"
      },
      {
         "following_id": "603d2149e2f8b9023d4a1f38"
      }
   ]
}

Frontend

The frontend will be a React.js single page application (SPA).

Libraries and frameworks

URLs

Views/components

Deployment

The app will be deployed on DigitalOcean using Docker containers within a virtual machine.

Team roles

  • Ian - backend Python development
  • Jacob - backend Python development/Database construction

Clone this wiki locally