ruben-abreu / applisnap-backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Management Server

Routes

Board Routes

Method Route Description
GET /api/boards?userId=${userId} Returns all boards from a specific userId
GET /api/boards/:boardId Returns a specific board
POST /api/boards Adds a new board
PUT /api/boards/:boardId Edits a board
DELETE /api/boards/:boardId Deletes a board

List Routes

Method Route Description
GET /api/lists?userId=${userId} Returns all lists from a specific userId
GET /api/lists/:listId Returns a specific list
POST /api/lists Adds a new list
PUT /api/lists/:listId Edits the specified list

Job Routes

Method Route Description
GET /api/jobs?userId=${userId} Returns all jobs from a specific userId
GET /api/jobs/:jobId Returns a specific job
POST /api/jobs Adds a new job
PUT /api/jobs/:jobId Edits the specified project
DELETE /api/jobs/:jobId Deletes a job

Auth Routes

Method Route Description
POST /auth/signup Creates a new user
POST /auth/login Logs the user
POST /auth/upload Upload user photo
GET /auth/verify Verifies the JWT
GET /auth/users/:userId Get user details
PUT /auth/users/:userId Change user details
PUT /auth/forgot-password Forgot Password
PUT /auth/reset-password Reset Password
DELETE /auth/users/:userId Delete user account
DELETE /auth/deleteImage/:imgPublicId Delete image

Models

Boards Model

{
  boardName: String,
  userId: {type: Schema.Types.ObjectId, ref: 'User'},
  lists: [{type: Schema.Types.ObjectId, ref: 'List'}],
}

Lists Model

{
  listName: ['Wishlist', 'Applied', 'Interviews', 'Offers', 'Rejected'],
  userId: {type: Schema.Types.ObjectId, ref: 'User'},
  boardId: {type: Schema.Types.ObjectId, ref: 'Board'},
  jobs: [{type: Schema.Types.ObjectId, ref: 'Job'}],
}

Jobs Model

{
  companyName: String,
  roleName: String,
  logoURL: String,
  jobURL: String,
  jobDescription: String,
  workModel: ['Remote', 'Hybrid', 'On-site'],
  workLocation: String,
  notes: String,
  customLabel: String,
  date: {
    created: Date,
    applied: Date,
    interviews: [Date],
    offer: Date,
    rejected: Date,
  },
  starred: Boolean,
  userId: {type: Schema.Types.ObjectId, ref: 'User'},
  boardId: {type: Schema.Types.ObjectId, ref: 'Board'},
  listId: {type: Schema.Types.ObjectId, ref: 'List'},
}

User Model

{
  firstName: String,
  lastName: String,
  email: String,
  password: String,
  resetLink: String,
  imgURL: String,
  imgPublicId: String,
  boards: [{ type: Schema.Types.ObjectId, ref: 'Boards' }],
  lists: [{ type: Schema.Types.ObjectId, ref: 'Lists' }],
  jobs: [{ type: Schema.Types.ObjectId, ref: 'Jobs' }],
}

Packages

bcryptjs

cloudinary

cookie-parser

cors

jsonwebtoken

mongoose

morgan

multer

nodemailer

About


Languages

Language:JavaScript 100.0%