Coder Social home page Coder Social logo

user-management-dashboard's Introduction

Tech stack

  • TypeScript
  • Next.js
  • Express.js
  • NextUI
  • Tailwind
  • PostgreSQL

Setting up the local database

macOS Terminal

Go to backend folder and run psql umd < umd.pgsql

Manually

  1. Create a database called umd
  2. Create a table called users with the following columns:
    • username character varying(44)
      • Set this as unique
    • firstname character varying(48)
    • lastname character varying(55)
    • user_id integer NOT NULL
      • Set this to primary key
      • This is the serial

Full SQL:

CREATE TABLE IF NOT EXISTS public.users
(
    username character varying(44) COLLATE pg_catalog."default",
    firstname character varying(48) COLLATE pg_catalog."default",
    lastname character varying(55) COLLATE pg_catalog."default",
    user_id integer NOT NULL DEFAULT nextval('users_user_id_seq'::regclass),
    CONSTRAINT users_pkey PRIMARY KEY (user_id),
    CONSTRAINT username_uniq UNIQUE (username)
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public.users
    OWNER to dummy;

Others

If user is not dummy and database name is not umd, go to backend/db.js and change the following code:

const db = new Pool({
  user: "dummy",     // change this line
  database: "umd",   // change this line
  host: "localhost",
  port: 5432,
});

How to run

Run both backend and frontend.

Backend

  1. Inside of the backend folder do npm install
  2. Then do nodemon index.js or node index.js

Frontend

  1. Inside of the frontend folder do npm install
  2. Then do npm run dev

user-management-dashboard's People

Contributors

itslame avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.