This fullstack application features a PostgreSQL Database connected to a Dockerized Node/Typescript REST API. The frontend is built using Typescript and the Next.js framework for React.
From the root directory, you can run all commands for both the backend and the frontend.
- Install
npm run install
- Lint
npm run lint
- Test
npm run test
- Build
npm run build
- Start (Locally)
npm run dev
Technologies:
- Node.js
- Typescript
- Docker
- PostgreSQL
- Express.js
The backend of this application has endpoints to manage products and orders for an ecommerce site. You can Create, Update, Read, and Delete from the PostgreSQL database via the API endpoints. This is intended to be hosted in AWS and follow the architecture outlined below.
npm install
npm run test
The default port for the backend is run on 3001, so running locally, calls should be made to http://localhost:3001/{ENDPOINT}
This project assumes the PostgreSQL database is already running and configured correctly.
To create the required database tables, install knex
and run the following command
cd ./backend/src/db && knex migrate:up
To get started run:
npm run dev
Name | Default Value | Description |
---|---|---|
DATABASE_HOST | localhost | database host |
DATABASE_PASSWORD | N/A | password to your database |
WHITELIST_ORIGINS | N/A | list of domains which have access to the API via CORS |
type | property |
---|---|
PK uuid | id |
text | name |
text | description |
enum | category |
text | vendor |
bigint | price |
bigint | quantity |
type | property |
---|---|
PK uuid | id |
bigint | amount |
enum | order_status |
text array | order_items |
text | account_id |
text | tracking_company |
text | tracking_number |
type | property |
---|---|
PK uuid | id |
FK(product.id) text | product |
bigint | price |
bigint | quantity |
Technologies:
- Typescript
- Next.js
- React
- NextUI
- Tailwind CSS
npm install
npm run test
N/A
The default port for the frontend is on 3000, so running locally, open your browser to http://localhost:3000
To get started run:
npm run dev