Project Overview
In this project, I created an entire API to serve information to a Boss Machine, a unique management application for today's most accomplished (evil) entrepreneurs. I created routes to manage 'minions', brilliant 'million dollar ideas', and to handle all the annoying meetings that keep getting added to a busy schedule.
API Routes
- Routes live inside the server folder.
- The 'database' exists in server/db.js. The beginning database will be seeded every time the server is restarted. There is more information on working with the database and the helper functions it exports below.
Routes Required
- /api/minions
- GET /api/minions to get an array of all minions.
- POST /api/minions to create a new minion and save it to the database.
- GET /api/minions/:minionId to get a single minion by id.
- PUT /api/minions/:minionId to update a single minion by id.
- DELETE /api/minions/:minionId to delete a single minion by id.
- GET /api/minions/:minionId/work to get an array of all work for the specified minion.
- POST /api/minions/:minionId/work to create a new work object and save it to the database.
- PUT /api/minions/:minionId/work/:workId to update a single work by id.
- DELETE /api/minions/:minionId/work/:workId to delete a single work by id.
- /api/ideas
- GET /api/ideas to get an array of all ideas.
- POST /api/ideas to create a new idea and save it to the database.
- GET /api/ideas/:ideaId to get a single idea by id.
- PUT /api/ideas/:ideaId to update a single idea by id.
- DELETE /api/ideas/:ideaId to delete a single idea by id.
- /api/meetings
- GET /api/meetings to get an array of all meetings.
- POST /api/meetings to create a new meeting and save it to the database.
- DELETE /api/meetings to delete all meetings from the database.
Schemas
- Minion:
- id: string
- name: string
- title: string
- salary: number
- Work:
- id: string
- title: string
- description: string
- hours: number
- minionId: string
- Ideas:
- id: string
- name: string
- description: string
- numWeeks: number
- weeklyRevenue: number
- Meetings:
- time: string
- date: JS 'Date' object
- day: string
- note: string