Skip to content

Database

Lily Howan edited this page Oct 23, 2022 · 8 revisions

MongoDB & MongoDB Atlas

MongoDB is a NoSQL database that stores data in BSON format. The document database is gathered into collections. Frequently accessed data is stored in the same place, allowing faster read operations.

Our database consists of 7 collections:

  • Account
  • Group
  • Note
  • Room
  • Session
  • User
  • VerificationToken

MongoDB Atlas is a multi-cloud database platform that enables setting up, deploying and scaling a database. It provides a UI to interact with your database.

Prisma

Prisma is an Object-Relational Mapping (ORM) used to handle our MongoDB calls for our serverless functions. It has a custom Schema Definition Language (SDL) that automatically writes migrations and generates type-safe code. Prisma schema keeps the database schema in sync and maintains the existing data whenever there are changes within the schema models. NextAuth.js supports both MongoDB and Prisma by providing an adapter. This simplifies the authentication.

Clone this wiki locally