A fully-featured billing software backend built with Spring Boot, JPA/Hibernate, and AWS S3 integration. This project provides a robust API for managing categories, items, orders, payments, and users with JWT-based authentication, Razorpay integration, and file uploads.
β User Authentication β Secure login with JWT tokens β Category & Item Management β CRUD operations with file uploads β Order Processing β Create, fetch, and delete orders β Payment Integration β Razorpay for secure transactions β AWS S3 Storage β Scalable file storage for images β Dashboard Analytics β Track sales, orders, and recent activity
- Developers looking for a billing system backend
- Startups needing a scalable e-commerce solution
- Freelancers building custom billing applications
| Category | Technologies Used |
|---|---|
| Language | Java (Java 21) |
| Framework | Spring Boot (3.x) |
| Database | MySQL (JPA/Hibernate) |
| Authentication | JWT, Spring Security |
| Payments | Razorpay API |
| File Storage | AWS S3 |
| Build Tool | Maven |
- Java 21 (or compatible)
- Maven 3.8+
- MySQL Database (or any supported RDBMS)
- AWS S3 Bucket (for file storage)
- Razorpay API Keys (for payment processing)
git clone https://github.com/Krishnendu/Billing_Software_Backend.git
cd Billing_Software_BackendCreate a .env file (or use application.properties directly):
# Database Config
DB_URL=jdbc:mysql://localhost:3306/billing_db
DB_USERNAME=root
DB_PASSWORD=your_password
# AWS S3 Config
AWS_ACCESS_KEY=your_access_key
AWS_SECRET_KEY=your_secret_key
AWS_REGION=us-east-1
AWS_BUCKET_NAME=your-bucket-name
# JWT Config
JWT_SECRET_KEY=your_jwt_secret_key
# Razorpay Config
RZP_KEY_ID=your_razorpay_key_id
RZP_SECRET=your_razorpay_secret_key
# Server Port
PORT=8080mvn spring-boot:runThe API will start at http://localhost:8080/api/v1.0
// Example: Login Request
POST /api/v1.0/login
{
"email": "user@example.com",
"password": "password123"
}
// Response: JWT Token
{
"email": "user@example.com",
"role": "ADMIN",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}// Example: Add Category with Image
POST /api/v1.0/admin/categories
Headers: Authorization: Bearer <JWT_TOKEN>
Body (multipart/form-data):
- category: {"name": "Electronics", "description": "Electronic devices"}
- file: <image-file.jpg>// Example: Create Order
POST /api/v1.0/orders
Headers: Authorization: Bearer <JWT_TOKEN>
Body:
{
"customerName": "John Doe",
"phoneNumber": "1234567890",
"cartItems": [
{
"itemId": "item-123",
"name": "Laptop",
"price": 999.99,
"quantity": 1
}
],
"subTotal": 999.99,
"tax": 50.00,
"grandTotal": 1049.99,
"paymentMethod": "CASH"
}// Example: Create Razorpay Order
POST /api/v1.0/payments/create-order
Headers: Authorization: Bearer <JWT_TOKEN>
Body:
{
"amount": 1049.99,
"currency": "INR"
}
// Response: Razorpay Order ID
{
"id": "order_1234567890",
"amount": 104999,
"currency": "INR",
"status": "created"
}src/
βββ main/
β βββ java/com/Krishnendu/BillingSoftware/
β β βββ config/ # Configuration classes
β β βββ controller/ # API Endpoints
β β βββ entity/ # Database Models
β β βββ filters/ # JWT Filter
β β βββ io/ # DTOs & Request/Response Objects
β β βββ repository/ # JPA Repositories
β β βββ service/ # Business Logic
β β βββ utils/ # Helper Classes
β βββ resources/ # Config Files
β βββ application.properties
β βββ static/ # Static Resources
βββ test/ # Unit & Integration Tests
| Variable | Description | Example Value |
|---|---|---|
DB_URL |
Database connection URL | jdbc:mysql://localhost:3306/db |
AWS_ACCESS_KEY |
AWS S3 Access Key | AKIAIOSFODNN7EXAMPLE |
JWT_SECRET_KEY |
JWT Secret Key | your_secure_jwt_key |
RZP_KEY_ID |
Razorpay API Key | rzp_test_key_id |
- Modify
application.propertiesfor database, AWS, and JWT settings. - Extend controllers to add new API endpoints.
- Adjust security rules in
SecurityConfig.java.
We welcome contributions! Hereβs how you can help:
- Fork the Repository
- Create a Feature Branch
git checkout -b feature/your-feature
- Commit Changes
git commit -m "Add new payment method" - Push & Open a Pull Request
# Install dependencies
mvn clean install
# Run tests
mvn test- Follow Java Best Practices (Lombok for boilerplate reduction).
- Use Spring Boot conventions for REST APIs.
- Write unit tests for critical logic.
π€ Krishnendu β GitHub
- Report bugs via GitHub Issues.
- Need help? Open a discussion or contact me directly.
β Core Features β Complete (Authentication, CRUD, Payments) π§ Next Steps β Add WebSocket for real-time updates π Future Improvements β Multi-currency support, advanced analytics
π Star this repo to support the project!
"Build powerful billing systems with ease!" π