A Point of Sale (POS) system for clubs, built with ASP.NET Core MVC backend and React frontend.
- Secure login system with JWT authentication
- Role-based access control (Admin, Seller)
- Product management
- Sales tracking and reporting
- Receipt printing integration
- MySQL database in Docker container
.
├── backend/ # ASP.NET Core MVC backend
│ ├── src/ # Source code
│ └── tests/ # Unit tests
├── frontend/ # React frontend
│ ├── src/ # Source code
│ └── public/ # Static files
├── docker/ # Docker configuration
└── docs/ # Documentation
- .NET Core SDK 7.0 or later
- Node.js 16.x or later
- Docker Desktop
- MySQL 8.0
- Windows 10/11
git clone <repository-url>
cd clubpos- Start MySQL using Docker:
cd docker
docker-compose up -d- Wait for MySQL to be ready (usually takes about 30 seconds)
- Navigate to the backend directory:
cd backend/src- Restore dependencies:
dotnet restore- Build the project:
dotnet build- Update the database connection string in
appsettings.jsonif needed:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;Database=clubpos;User=root;Password=your_password;"
}
}- Run the backend:
dotnet run --project ClubPOS.APIThe backend will be available at http://localhost:5000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm startThe frontend will be available at http://localhost:3000
- Open your browser and navigate to
http://localhost:3000 - Log in with the default credentials:
- Username: admin
- Password: admin123
- The backend uses ASP.NET Core MVC
- API endpoints are available at
http://localhost:5000/api/* - Swagger documentation is available at
http://localhost:5000/swagger
- The frontend uses React with TypeScript
- Material-UI is used for the UI components
- API requests are automatically proxied to the backend
- Hot reloading is enabled for development
- MySQL runs in a Docker container
- Default credentials:
- Host: localhost
- Port: 3306
- Database: clubpos
- Username: root
- Password: your_password
- Navigate to the backend directory:
cd backend/src- Build the release version:
dotnet publish -c Release- The published files will be in
bin/Release/net7.0/publish
- Navigate to the frontend directory:
cd frontend- Build the production version:
npm run build- The built files will be in the
builddirectory
-
Database Connection Issues
- Ensure MySQL container is running:
docker ps - Check connection string in
appsettings.json - Verify MySQL port is not blocked
- Ensure MySQL container is running:
-
Backend Build Issues
- Clear NuGet cache:
dotnet nuget locals all --clear - Delete bin and obj folders
- Run
dotnet restoreagain
- Clear NuGet cache:
-
Frontend Build Issues
- Delete node_modules folder
- Clear npm cache:
npm cache clean --force - Run
npm installagain
- JWT-based authentication
- Role-based access control
- Secure password hashing
- API rate limiting
- CORS configuration
MIT