A modern full-stack inventory management system built with TypeScript, Express, SQL Server, and Next.js.
- ✅ Product management with real-time inventory tracking
- ✅ Category organization system
- ✅ User authentication and role-based access control
- ✅ Responsive Material UI interface
- ✅ Complete API documentation with Swagger
- ✅ Containerized with Docker for easy deployment
- Framework: Node.js with Express
- Language: TypeScript
- ORM: TypeORM
- Database: SQL Server
- Documentation: Swagger
- Testing: Vitest
- Framework: Next.js 15
- UI Library: Material UI 6
- State Management: React Hooks
- API Client: Axios
- Containerization: Docker & Docker Compose
- CI/CD: GitHub Actions
- Linting: ESLint
- Development: Nodemon, TypeScript
- Docker and Docker Compose
- Node.js (for local development)
- Clone the repository
git clone https://github.com/samuelfsilva/inventory-management.git
cd inventory-management- Set up environment variables
cp .env.example .env- Start with Docker
docker-compose up -d- Access the application
- Frontend: http://localhost:3000
- API: http://localhost:3333
- API Docs: http://localhost:3333/doc
cd backend
npm install
npm run dev # Start development server
npm run swagger # Generate API docs
npm test # Run testscd frontend
npm install
npm run dev # Start development server
npm run build # Build for production# Generate migration
npm run homologation:migrate:generate ./src/database/migrations/MigrationName
# Apply migrations
npm run homologation:migrate
# Revert migrations
npm run homologation:migrate:revertinventory-management/
├── backend/ # Express API with TypeORM
│ ├── src/
│ │ ├── database/ # DB connections & migrations
│ │ ├── entities/ # TypeORM entities
│ │ ├── middleware/ # Middleware
│ │ ├── migration/ # TypeORM migrations
│ │ ├── routes/ # API routes
│ │ ├── schema/ # Joi validation schemas
│ │ ├── test/ # Unit tests
│ │ ├── index.ts # Entry point
│ │ ├── server.ts # Express server
│ │ ├── swagger.ts # Swagger setup
│ │ └── vite.config.ts # Vite configuration
├── database/ # SQL Server setup
├── frontend/ # Next.js application
│ ├── src/
│ │ ├── app/ # Main
│ │ ├── components/ # UI components
│ │ ├── pages/ # Pages
│ │ ├── services/ # API services
│ │ └── utils/ # Utilities
├── .dockerignore
├── .env.example
├── .gitignore
├── LICENSE
├── README.md
└── docker-compose.yml
# Frontend
NEXT_PUBLIC_API_URL=http://localhost:3333
# Backend
API_PORT=3333
FRONTEND_URLS=http://localhost:3000
# Database
DB_HOST=sqlserver
DB_PORT=1433
DB_USERNAME=sa
DB_PASSWORD=YourStrongPassword
DB_DATABASE=inventory
# Docker
DOCKER_FRONTEND_PORT=3000
| Method | Endpoint | Description |
|---|---|---|
| GET | /category | Get all categories |
| GET | /category/:id | Get category by ID |
| POST | /category | Create a category |
| PUT | /category/:id | Update a category |
| DELETE | /category/:id | Delete a category |
| GET | /product | Get all products |
| GET | /product/:id | Get product by ID |
| GET | /product/active | Get all active products |
| POST | /product | Create a product |
| PUT | /product/:id | Update a product |
| DELETE | /product/:id | Delete a product |
| GET | /user | Get all users |
| GET | /user/:id | Get user by ID |
| GET | /user/firstName/:firstName | Get user by first name |
| GET | /user/active | Get all active users |
| POST | /user | Create a user |
| PUT | /user/:id | Update a user |
| DELETE | /user/:id | Delete a user |
| ... | ... | ... |
Full API documentation is available at /doc when running the application.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License - see the LICENSE file for details.