Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Club POS System

A Point of Sale (POS) system for clubs, built with ASP.NET Core MVC backend and React frontend.

Features

  • 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

Project Structure

.
├── 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

Prerequisites

  • .NET Core SDK 7.0 or later
  • Node.js 16.x or later
  • Docker Desktop
  • MySQL 8.0
  • Windows 10/11

Getting Started

1. Clone the Repository

git clone <repository-url>
cd clubpos

2. Database Setup

  1. Start MySQL using Docker:
cd docker
docker-compose up -d
  1. Wait for MySQL to be ready (usually takes about 30 seconds)

3. Backend Setup

  1. Navigate to the backend directory:
cd backend/src
  1. Restore dependencies:
dotnet restore
  1. Build the project:
dotnet build
  1. Update the database connection string in appsettings.json if needed:
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Port=3306;Database=clubpos;User=root;Password=your_password;"
  }
}
  1. Run the backend:
dotnet run --project ClubPOS.API

The backend will be available at http://localhost:5000

4. Frontend Setup

  1. Navigate to the frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Start the development server:
npm start

The frontend will be available at http://localhost:3000

5. Access the Application

  1. Open your browser and navigate to http://localhost:3000
  2. Log in with the default credentials:
    • Username: admin
    • Password: admin123

Development

Backend Development

  • 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

Frontend Development

  • 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

Database Management

  • MySQL runs in a Docker container
  • Default credentials:
    • Host: localhost
    • Port: 3306
    • Database: clubpos
    • Username: root
    • Password: your_password

Building for Production

Backend

  1. Navigate to the backend directory:
cd backend/src
  1. Build the release version:
dotnet publish -c Release
  1. The published files will be in bin/Release/net7.0/publish

Frontend

  1. Navigate to the frontend directory:
cd frontend
  1. Build the production version:
npm run build
  1. The built files will be in the build directory

Troubleshooting

Common Issues

  1. Database Connection Issues

    • Ensure MySQL container is running: docker ps
    • Check connection string in appsettings.json
    • Verify MySQL port is not blocked
  2. Backend Build Issues

    • Clear NuGet cache: dotnet nuget locals all --clear
    • Delete bin and obj folders
    • Run dotnet restore again
  3. Frontend Build Issues

    • Delete node_modules folder
    • Clear npm cache: npm cache clean --force
    • Run npm install again

Security

  • JWT-based authentication
  • Role-based access control
  • Secure password hashing
  • API rate limiting
  • CORS configuration

License

MIT

About

Point of Sales (POS) System for AIF

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages