This Billing System is a comprehensive, user-friendly application built using the MERN stack (MongoDB, Express.js, React.js, Node.js). It allows businesses to manage their billing operations efficiently, track transactions, and generate invoices. The system provides an intuitive interface for both users and administrators to interact with.
- Invoice Generation: Create and manage invoices with ease.
- Transaction History: View and track past transactions.
- Admin Dashboard: Access detailed reports and manage transactions.
- Frontend: React.js (Vite.js)
- Backend: Node.js, Express.js
- Database: MongoDB
Billing-System/
├── frontend/ # Frontend-related files (UI, components, etc.)
│ ├── assets/ # Static files (CSS, JS, Images)
│ ├── components/ # Reusable UI components (header, footer, etc.)
│ ├── views/ # Frontend views (home, login, dashboard, etc.)
│ └── scripts/ # Core frontend functionalities (product handling, billing logic)
├── backend/ # Backend-related files (APIs, server, database)
│ ├── config/ # Configuration files (database connection, settings)
│ ├── controllers/ # Functions to handle requests and interact with the database
│ ├── models/ # Database models (schemas)
│ ├── routes/ # API routes for different functionalities
│ ├── scripts/ # Backend logic (billing calculations, inventory management)
│ └── utils/ # Backend utility functions (helpers, formatters)
└── admin/ # Admin panel-related files (admin dashboard, user management)
├── assets/ # Static files (CSS, JS, Images)
├── components/ # Reusable UI components (admin header, footer, etc.)
├── views/ # Admin views (user management, reports, etc.)
└── scripts/ # Admin panel functionalities (CRUD operations, admin logic)
- Node.js (v14 or above)
- MongoDB (local or cloud setup)
- npm or yarn
git clone https://github.com/nameissakthi/Billing-System.git cd Billing-SystemTip: To efficiently install dependencies for both frontend and backend simultaneously, use split terminals.
Install frontend dependencies
cd Billing-System/frontend
npm installInstall admin dependencies
cd Billing-System/admin
npm installInstall backend dependencies
cd Billing-System/backend
npm installBackend
- Create a
.envfile in thebackenddirectory. - Add the following variables with appropriate values
# Database connection string
MONGODB_URI="mongodb://localhost:27017/your-database-name"Frontend & Admin
- Create a
.envfile in thefrontend & Admindirectory - Add the following variable:
# Backend URL (adjust if needed)
VITE_BACKEND_URL="http://localhost:4000" Important
- Replace all placeholders (e.g., your_database_name, your_email) with your actual values.
- Exclude the
.envfile from version control to protect sensitive information.
Important:
- Separate terminals: Run the commands in separate terminal windows or use
split terminalto avoid conflicts. - Nodemon required: Ensure you have
nodemoninstalled globally to run the backend development servers usingnpm run dev. You can install it globally usingnpm install -g nodemon.
- Navigate to the
backenddirectory:cd backend - Start the server:
npm run server - You should see a message indicating the server is running, usually on port 4000 or you can specify it in the PORT environment variable inside
.envfile.
- Navigate to the
frontenddirectory:cd frontend - Start the server:
npm run dev
- Navigate to the
admindirectory:cd admin - Start the server:
npm run dev
Don't forget to star the repository and share your feedback!✨
This project is licensed under the MIT License.