Skip to content

Latest commit

 

History

History
73 lines (61 loc) · 1.89 KB

README.md

File metadata and controls

73 lines (61 loc) · 1.89 KB

Reverb 🎧

maxresdefault

This is fullstack replica of one of my favorite applications ever: Spotify! Authentfication, relational databases, serverless functions, and much more are all implemented to give the closest experience to Spotify as possible. Users can sign up, create playlists, like songs and of course - listen to their favorite tunes 🎵

Table of Contents 🗞️

  1. Tech Stack
  2. Database Schema

Tech Stack 💼

  • Written in: TypeScript
  • Authentification: JWT, Cookies, Bcrypt
  • Frontend: Next.js, React.js
  • Backend: Prisma Postgres Database Hosted by Heroku

Database Schemas 🗺

User Table

model User {
  id        Int        @id @default(autoincrement())
  createdAt DateTime   @default(now())
  updatedAt DateTime   @updatedAt
  email     String     @unique
  firstName String
  lastName  String
  password  String
  playlists Playlist[]
}

Song Table

model Song {
  id        Int        @id @default(autoincrement())
  createdAt DateTime   @default(now())
  updatedAt DateTime   @updatedAt
  name      String
  artist    Artist     @relation(fields: [artistId], references: [id])
  artistId  Int
  playlists Playlist[]
  duration  Int
  url       String
}

Artist Table

model Artist {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
  songs     Song[]
  name      String   @unique
}

Playlist Table

model Playlist {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
  name      String
  songs     Song[]
  user      User     @relation(fields: [userId], references: [id])
  userId    Int
}