Skip to content

PunGrumpy/kmitl-mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

30 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆธ๐Ÿป Super Hero Suit Management System (KMITL Exit Exam with MVC Pattern)

Preview

๐Ÿฉป Technologies Stack

  • ๐Ÿ’ช TypeScript - Safer, more readable, and more maintainable code
  • ๐Ÿˆ NestJS - A progressive Node.js framework for building efficient, reliable, and scalable server-side applications
  • ๐Ÿถ Prisma ORM - A modern database toolkit for TypeScript & Node.js that is used to interact with the database
  • ๐Ÿ˜ PostgreSQL - A powerful, open-source object-relational database system
  • ๐Ÿ’… Prettier - An opinionated code formatter
  • ๐Ÿงน ESLint - A tool for identifying and reporting on patterns found in ECMAScript/JavaScript code
  • ๐Ÿž Bun - A fast JavaScript/TypeScript runtime
  • ๐Ÿฆข Swagger - An open-source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful web services
  • ๐Ÿ”ฎ Scalars - A API reference to over Swagger UI

๐Ÿ“ฆ Project Structure

This project follows the MVC (Model-View-Controller) design pattern with clear separation of responsibilities:

๐Ÿ—๏ธ Model Layer

  • db/schema.prisma
    Defines the data structure for superhero suits, including suit ID, type, and durability level.
  • libs/interfaces/suit-validation.interface.ts
    Specifies interfaces for validating each type of suit.
  • libs/validators/suit-durability.validator.ts
    Contains the logic to validate the durability of each suit type based on predefined conditions.

๐Ÿ‘€ View Layer (API Endpoints)

  • src/superhero-suit/superhero-suit.controller.ts
    Manages data exchange through API endpoints for handling superhero suit operations.
  • src/superhero-suit/superhero-suit.dto.ts
    Specifies the data transfer format for input and output via the API.

๐ŸŽฎ Service Layer (Business Logic)

  • src/superhero-suit/superhero-suit.service.ts
    Implements the business logic for creating, validating, and repairing superhero suits.
  • src/superhero-suit/superhero-suit.module.ts
    Connects and organizes the different components within the superhero suit module.

๐Ÿ› ๏ธ Infrastructure Layer

  • libs/prisma/prisma.service.ts
    Manages the database connections using Prisma.
  • libs/decorators/catch-prisma.decorator.ts
    Handles errors that occur during database operations.

๐ŸŒฑ Data Seeding

  • db/seed.ts
    Generates sample data for superhero suits.
    Requirement: At least 50 total suits, with a minimum of 10 suits per suit type.

๐Ÿงข How To Use

  1. Clone this repository
git clone git@github.com:PunGrumpy/kmitl-mvc.git
  1. Install dependencies
bun install
  1. Run the development server
bun dev
  1. Open http://localhost:3000 and http://localhost:3000/docs with your browser to see the result.

๐Ÿ“š API Documentation

๐Ÿ™ Reference

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

๐ŸŽ“ Exit Exam for MVC (Model View and Controller)

Topics

Resources

License

Stars

Watchers

Forks