People CRUD App

A fullstack CRUD app that implements a REST API for connecting users with a Postgres database.

Setup Instructions:

Setting up postgres database:

  • Download and install PostgresQL
  • In terminal run ``psql`
  • Enter postgres user entering psql -U postgres (enter password if prompted)
  • Create Users Database by typing:
CREATE TABLE persons(
  _id SERIAL PRIMARY KEY,
  firstname VARCHAR(50),
  lastname VARCHAR(50),
  sex VARCHAR(10),
  birthday DATE
);
  • In /server/db.js, enter password for postgres (super user) user

Libraries / Tools:

  • ReactJS
  • ExpressJS
  • Postgres

CRUD Operations:

Endpoint Description
GET /api/persons Get all persons
POST /api/persons Create new person
DELETE /api/persons/:id Delete person
POST /api/persons/:id Update person

Design Decisions:

POSTGRESQL

  • Enables application to scale up as the capacity and number of entries in the database grows however may limit flexibility once the project has reached production.
  • SQL over NoSQL would allow for relationships between users and future additional schemas to be added (e.g. Jobs)
  • SQL offers a more structured setup and may be better for security with user data

REACT

  • To be written

Node / Express

  • To be written

Project Takeaways

  • To be written

Showcase