- Creating products, orders and users
- linking order to users
- Assigning products to orders
- Showing specific table rows
- Showing custom relations between tables
- Authenticating users
- Testing its models (unit testing) and routes (integration testing)
For more info about the project, RESTful routes, database schema visit REQUIREMENTS.md
-
- Create user:
CREATE USER store_user WITH PASSWORD 'chosenPassword123';
- Create database:
CREATE DATABASE store_front;
- Create test database:
CREATE DATABASE store_front_test;
- Grant all privilages to user in both databases:
GRANT ALL PRIVILAGES ON DATABASE store_front TO store_user;
GRANT ALL PRIVILAGES ON DATABASE store_front_test TO store_user;
- Create user:
-
- PG_HOST=127.0.0.1
- PG_DATABASE=store_front
- PG_DATABASE_TEST=store_front_test
- PG_USER=store_user
- PG_PASSWORD=chosePassword123
- ENV=dev
- BCRYPT_PASSWORD=[[Pepper-preference]]
- SALT_ROUNDS=[[Hashing-rounds-preference]]
- TOKEN_SECRET=[[Secret-signature-preference]]
- PG_HOST=127.0.0.1
-
- Database port:
5432
- Development Server port:
3000
- Testing server port:
4000
- Database port:
-
- Packages installation:
npm install
- Build:
npm run build
- Test models & routes:
npm run test
- Watch server:
npm run watch
- Start:
npm run start
- Packages installation:
- Integrate with the front-end to present project functionality to users.
- Add method to progerss order status steps from 'pending' to 'shipped'.
- Require user info on order creation.
- Add checkout functionality to submit order for shipping.
- Include database table to organize orders ready for shipping and start checking them.
- Authorize user to allow accessing progressing orders and edit them.
By failing to prepare, you're preparing to fail.
- Gathering requirements and planning could be more important than developing the product, which was true to me in this project.
- Returning to the big picture from time to time and aligning current task with our main objective is very important to visualize the process in our mind. It was mentioned before in learning how to learn course. After learning this concept, this project was my first actual proof of it.
- Learning the concept is more important than knowing the syntax, I knew this before but, I experienced it here.