- Multi-tenant Architecture - Support for multiple shops with isolated data
- Modern Tech Stack - Built with Astro, Supabase, and Prisma
- Role-Based Access Control - Owner, Manager, and Staff roles with granular permissions
- Real-time Inventory - Track stock levels across multiple locations
- Point of Sale - Process sales with an intuitive interface
- Comprehensive Reporting - Sales, inventory, and performance insights
- API-First Design - Full-featured REST API for integration
- Frontend: Astro + React + TypeScript
- UI Components: Shadcn UI + Tailwind CSS
- Backend: Node.js with Astro API Routes
- Database: PostgreSQL with Prisma ORM
- Authentication: Supabase Auth
- Containerization: Docker + Docker Compose
- Testing: Vitest + Supertest
- Docker and Docker Compose
- Node.js 18+
- Git
-
Clone the repository
git clone https://github.com/your-username/inventauri-v2.git cd inventauri-v2 -
Set up environment variables
cp .env.example .env.local
Update the values in
.env.localwith your configuration. -
Start the development environment
docker compose up -d npm install npx prisma migrate dev npm run dev
-
Access the application
- Web Interface: http://localhost:4321
- API Documentation: http://localhost:4321/api-docs
- Database Admin: http://localhost:8080 (pgAdmin)
├── .github/ # GitHub Actions workflows
├── prisma/ # Database schema and migrations
│ ├── migrations/ # Versioned SQL migrations
│ ├── schema.prisma # Prisma schema definition
│ └── seed.ts # Database seeding script
│
├── public/ # Static assets
│ └── images/ # Image assets
│
├── src/
│ ├── components/ # Reusable UI components
│ ├── lib/ # Application logic
│ ├── pages/ # Application routes
│ ├── styles/ # Global styles
│ └── types/ # TypeScript type definitions
│
├── tests/ # Test suites
├── .env.example # Example environment variables
├── docker-compose.yml # Docker Compose configuration
├── package.json # Project dependencies
└── tsconfig.json # TypeScript configuration- Shop, User, Product, ProductVariant, Warehouse, Inventory, Transaction, Order
shop_idcolumn for tenant-scoped tables- Row-level security for data isolation
- Users linked to a single shop
-
Authentication: Email/password with Supabase Auth
-
Roles:
- Owner: Full access
- Manager: Inventory and sales
- Staff: Basic POS
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYDATABASE_URLJWT_SECRETNODE_ENV
npm install # Install dependencies
npm run dev # Start development server
npm run build # Build for production
npm test # Run tests
npm run test:watch # Watch mode tests
npm run test:contracts
npm run lint # Run linter
npm run type-check # Type checkernpm run db:migrate # Run migrations
npm run db:generate # Generate Prisma client
npm run db:reset # Reset database
npm run db:seed # Seed databasedocker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -ddocker compose up -d
npm run db:migrate
npm run dev- Multi-tenant architecture
- Role-based access control
- Product variant management
- Real-time inventory tracking
- Offline mode with sync
- Advanced reporting
- Barcode scanning
- Supplier management
POST /api/auth/registerPOST /api/auth/loginPOST /api/auth/refreshPOST /api/auth/logout
GET /api/productsPOST /api/productsGET /api/products/:idPUT /api/products/:idDELETE /api/products/:id
GET /api/inventoryPOST /api/inventory/inboundPOST /api/inventory/adjustGET /api/inventory/history
POST /api/salesGET /api/sales/:idPOST /api/sales/:id/refund
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.