Skip to content

Frontend (Nuxt) & Backend (Express) homemade ๐Ÿซ•

Notifications You must be signed in to change notification settings

nibroos/fs-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

18 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


Backend

๐Ÿš€ Quick Start

Developement Environment

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

Test Environment

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

๐Ÿ›Ž Available Commands for the Server

  • 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

๐Ÿ’Ž The Package Features

ย ย  ย ย  ย ย 

ย ย  ย ย  ย ย  ย ย  ย ย 

ย ย  ย ย 

๐Ÿณ Docker :: Container Platform

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.

๐Ÿ“— API Document

All endpoints stored in fstest-nibros.postman_collection.json


Frontend

๐Ÿš€ Quick Start

Developement Environment

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

๐Ÿ›Ž Available Commands for the Server

  • Run the Server in development mode : npm run dev in VS Code

๐Ÿ’Ž The Package Features

ย ย  ย ย 

ย ย  ย ย  ย ย  ย ย  ย ย 


Features

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!