Full stack app built with Postgres-Express-React-Nodejs Stack, hosted on AWS, and use CircleCI as CI/CD.
- Dependencies
- Infrastructure
- Pipeline
- Project setup
- Available scripts
- Three tiers architecture
- DB
- postgres
- API
- NodeJs
- Typescript
- ExpressJs
- UI
- ReactJs
- AntD
- Hosted
- AWS
- CI/CD
- CircleCI
-
Clone the project
git clone https://github.com/IMM9O/udacity-storefront.git
. -
Installation is done using the npm install command:
npm install
.
Note: Install command will also install client&server dependencies
-
Install postgres on your local machine from this link.
-
Open
Sql Shell
(psql). -
Connect to the default postgres database user
psql -U postgres
. -
In
psql
run the following to create the dev, test, and production databases.
/** DEV database **/
CREATE DATABASE udacity_storefront_dev;
/** Test database **/
CREATE DATABASE udacity_storefront_test;
/** Production database **/
CREATE DATABASE udacity_storefront;
-
Setup database
npm run db:up
. -
Make a copy for
.env.example
file to.env
and then change the variables to match your environment.
Don't forget to replace {database_password} with your current postgres password
NODE_ENV=dev
DB_HOST=127.0.0.1
DB_USER=postgres
DB_PASSWORD={database_password}
DB_DATABASE_DEV=udacity_storefront_dev
DB_DATABASE_TEST=udacity_storefront_test
DB_DATABASE_PROD=udacity_storefront
BCRYPT_PASSWORD=
SALT_ROUNDS=
TOKEN_SECRET=
- To start the app run
npm start
.
Note: This command will start both app the client and the server
Database Port | Server Port | Client Port |
---|---|---|
5432 | 3001 | 3000 |
- To start both frontend and backend app run
npm start
- To check app format run
npm run prettier
- To check app error run
npm run lint
- To test both frontend and backend app run
npm run test
- To build both frontend and backend app run
npm run build
For More information go to here => Database
For More information go to here => REQUIREMENTS
URL | Type | Token Required |
/api/products/ | GET | β |
/api/products/:id | GET | β |
/api/products/ | POST | β |
/api/products/:id | UPDATE | β |
/api/products/:id | DELETE | β |
/api/users/ | GET | β |
/api/users/:id | GET | β |
/api/users/ | POST | β |
/api/users/:id | UPDATE | β |
/api/users/:id | DELETE | β |
/api/users/:id/authenticate | POST | β |
/api/orders/:userId | GET | β |
/api/orders/completed/:userId | GET | β |
/api/orders/active/:userId | GET | β |
/api/orders/:id | GET | β |
/api/orders/ | POST | β |
/api/orders/:id | UPDATE | β |
/api/orders/:id | DELETE | β |
/api/orders/:id/products | POST | β |
/api/orders/:id/products | GET | β |
The UI built with the help of create react app. For More information go to here => UI