A comprehensive, production-ready, full-stack inventory management system built with modern technologies for real-time stock tracking, user management, and reporting.
# Clone the repository
git clone <repository-url>
cd RTIMS
# Start with Docker (easiest)
docker-compose up -d
# Or use make commands
make setup
make devAccess the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
- Swagger Docs: http://localhost:8080/swagger/index.html
Default Login: admin@example.com / admin123
π See QUICKSTART.md for detailed setup instructions. π See DEPLOYMENT.md for production deployment guide.
- Features
- Tech Stack
- Quick Start
- Development
- API Documentation
- Deployment
- Project Structure
- Contributing
- License
- Real-time Inventory Tracking: Live stock updates via WebSocket
- User Management: Role-based access control (Staff/Admin)
- Product Management: Complete CRUD operations with advanced filtering
- Stock Movement Tracking: Automatic logging of all inventory changes
- Low Stock Alerts: Automated notifications for inventory thresholds
- Audit Logging: Complete audit trail for compliance
- Dashboard Analytics: Visual insights with charts and metrics
- Report Generation: Export reports in multiple formats (CSV, PDF, Excel)
- RESTful API: Comprehensive API with Swagger documentation
- WebSocket Integration: Real-time updates for connected clients
- JWT Authentication: Secure token-based authentication with refresh tokens
- Role-Based Access Control: Granular permissions for different user roles
- Responsive Design: Optimized for desktop and mobile devices
- Email Notifications: Automated email alerts for important events
- Database Migrations: Version-controlled database schema management
- Go: High-performance backend with Gin framework
- PostgreSQL: Robust relational database with advanced features
- Redis: Session management and caching
- WebSocket: Real-time communication (Gorilla WebSocket)
- JWT: Secure authentication and authorization
- Swagger: API documentation
- Next.js 14: React framework with App Router
- TypeScript: Type-safe development
- TailwindCSS: Utility-first CSS framework
- shadcn/ui: Modern component library
- Recharts: Data visualization
- React Hook Form: Form handling with validation
- Axios: HTTP client with interceptors
- Docker: Containerization for easy deployment
- GitHub Actions: CI/CD pipeline (bonus feature)
- Environment Configuration: Multi-environment support
- Go 1.21+
- Node.js 18+
- PostgreSQL 13+
- Redis 6+
- Docker (optional)
git clone <repository-url>
cd RTIMScd backend
go mod downloadCreate a .env file in the backend directory:
ENVIRONMENT=development
PORT=8080
DATABASE_URL=postgres://user:password@localhost:5432/rtims?sslmode=disable
REDIS_URL=redis://localhost:6379
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
REFRESH_SECRET=your-super-secret-refresh-key-change-this-in-production
EMAIL_API_KEY=your-email-api-key
EMAIL_FROM=noreply@rtims.com# Run database migrations
go run main.go migrate up
# Seed initial data
go run main.go seedgo run main.goThe backend will start on http://localhost:8080
cd frontend
npm installCreate a .env.local file in the frontend directory:
NEXT_PUBLIC_API_URL=http://localhost:8080/api/v1npm run devThe frontend will start on http://localhost:3000
# Start PostgreSQL and Redis
docker-compose up -d- Install PostgreSQL and Redis
- Create database:
rtims - Run the migration file:
database/migrations/001_initial_schema.sql
RTIMS/
βββ backend/ # Complete Go backend
β βββ config/ # Configuration management
β βββ docs/ # API documentation
β βββ internal/ # Private application code
β β βββ database/ # Database connection and models
β β βββ handlers/ # HTTP handlers
β β βββ middleware/ # Custom middleware
β β βββ models/ # Data models
β β βββ websocket/ # WebSocket implementation
β βββ main.go # Application entry point
βββ frontend/ # Complete Next.js frontend
β βββ src/
β β βββ app/ # Next.js app router pages
β β βββ components/ # React components
β β βββ contexts/ # React contexts
β β βββ lib/ # Utility libraries
β β βββ types/ # TypeScript type definitions
β βββ public/ # Static assets
βββ database/ # Database migrations and seeds
βββ docker-compose.yml # Docker configuration
Access Swagger documentation at: http://localhost:8080/swagger/index.html
go run main.go # Start the server
go test ./... # Run tests
go mod tidy # Clean up dependenciesnpm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run type-check # Run TypeScript check- Admin:
admin@example.com/admin123 - Staff:
staff@example.com/staff123
Include JWT token in Authorization header:
Authorization: Bearer <your-jwt-token>
- WebSocket connections for live stock updates
- Automatic notifications for low stock items
- Real-time dashboard statistics
- Staff: Can manage products and stock levels
- Admin: Full system access including user management and reports
- All actions are logged with user, timestamp, and IP address
- Complete history of changes for compliance
- Inventory reports with customizable filters
- Stock movement analysis
- Export capabilities (CSV, PDF, Excel)
go test ./internal/... -vnpm run test# Build and run with Docker Compose
docker-compose up --build# Backend
go build -o bin/rtims-backend ./backend
# Frontend
cd frontend && npm run build- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please contact the development team or create an issue in the repository.
- Initial release with core inventory management features
- Real-time WebSocket integration
- Role-based authentication
- Comprehensive API documentation
- Modern React frontend with TypeScript
Built with β€οΈ using Go, Next.js, and modern web technologies.