Copy .env.development.local.example
, rename it to .env.development.local
, Modify to suit your environment, focus on these key, you can leave others as it is. The key name is explanatory itself.
# PORT
PORT=3000
# DATABASE
DB_USER=postgres
DB_PASSWORD=root
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=fstest-nibros
DB_DIALECT=postgres
Note : make sure to run bash on backend folder.
Install package
npm install
Run migrations
npx sequelize-cli db:migrate
Run seeders
npx sequelize-cli db:seed:all
Run development server
npm run dev
Copy .env.test.local.example
, rename it to .env.test.local
, Modify to suit your environment, focus on these key, you can leave others as it is. The key name is explanatory itself.
# PORT
PORT=3000
# DATABASE
DB_USER=postgres
DB_PASSWORD=root
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=fstest-nibros
DB_DIALECT=postgres
Run migrations (skip if already run)
npx sequelize-cli db:migrate
Run seeders (skip if already run)
npx sequelize-cli db:seed:all
Run test
npm test
- Run the Server in production mode :
npm run start
in VS Code - Run the Server in development mode :
npm run dev
in VS Code - Run all unit-tests :
npm test
in VS Code - Check for linting errors :
npm run lint
in VS Code - Fix for linting :
npm run lint:fix
in VS Code
Docker Install.
- Starts the containers in the background and leaves them running :
docker-compose up -d
- Stops containers and removes containers, networks, volumes, and images :
docker-compose down
Modify docker-compose.yml
and Dockerfile
file to your source code.
All endpoints stored in fstest-nibros.postman_collection.json
Copy .env.example
, rename it to .env
, Modify to suit your environment, focus on these key, you can leave others as it is. The key name is explanatory itself.
# PORT
API_URL=http://localhost:3050 #BACKEND BASE API
Note : make sure to run bash on frontend folder.
Install package
npm install
Run development server
npm run dev
- Run the Server in development mode :
npm run dev
in VS Code
Highlighting some of the main features I implemented based on core requirements. Additionally, I added some extra features for your consideration:
- Vendor Modules: Fully functional CRUD operations with backend validation and global search capabilities.
- Searchable Units: Implemented custom autocomplete dynamic components for unit search.
- Global State Management: Used persisted Pinia state management to dynamically update the vendor list.
- Backend Structure: Followed an MVC-based structure with a service design pattern.
- Database Management: Using Sequelize for database migration and seeding.
- Type Hinting: Most of the code is type-hinted for better readability and maintenance.
- Authentication System: Developed a complete authentication system including login, signup, and logout functionalities.
- Backend Validation & Error Handling: Added validation and error handling using middleware.
Feel free to ask if you have any questions or need more details!