A modern, full-stack accounting application built with Django REST Framework and React TypeScript, designed with Sage-style professional UI/UX.
- β Double-Entry Bookkeeping - Proper accounting principles with debit/credit validation
- β Chart of Accounts - Hierarchical account structure with parent-child relationships
- β Transaction Management - Draft β Pending β Posted β Cancelled workflow
- β Real-time Balance Calculation - Account balances calculated from posted transactions
- β JWT Authentication - Secure API access with token refresh
- β Professional Data Validation - Comprehensive business rule enforcement
- β PostgreSQL Database - Optimized with proper indexing and relationships
- β Sage-Style UI - Professional accounting software interface
- β Responsive Dashboard - Financial overview with key metrics
- β Account Management - Create, edit, and organize chart of accounts
- β Transaction Entry - Intuitive double-entry transaction recording
- β Financial Reports - Template system for standard accounting reports
- β Type-Safe API Integration - Full TypeScript coverage with Axios
- β Modern Component Architecture - Reusable, maintainable React components
Backend:
- Django 4.2.7
- Django REST Framework
- PostgreSQL
- JWT Authentication
- Docker & Docker Compose
Frontend:
- React 18
- TypeScript
- Vite
- Tailwind CSS
- Axios
- Lucide React Icons
- Python 3.11+
- Node.js 18+
- PostgreSQL 15+ (or Docker)
- Git
-
Clone the repository
git clone https://github.com/yourusername/accountspro.git cd accountspro/backend -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Database setup
# Option A: Using Docker docker run --name accounts-postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=accounts_db -p 5432:5432 -d postgres:15 # Option B: Use local PostgreSQL and create database 'accounts_db'
-
Environment configuration
cp .env.example .env # Edit .env with your database credentials -
Run migrations and create sample data
python manage.py makemigrations python manage.py migrate python manage.py create_sample_data
-
Start development server
python manage.py runserver
-
Navigate to frontend directory
cd ../frontend -
Install dependencies
npm install
-
Environment configuration
cp .env.example .env # Configure API URL if needed -
Start development server
npm run dev
-
Using Docker Compose
cd backend docker-compose up -d -
Run migrations in Docker
docker-compose exec backend python manage.py migrate docker-compose exec backend python manage.py create_sample_data
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api
- Django Admin: http://localhost:8000/admin
-
Default credentials:
- Username:
admin - Password:
admin123
- Username:
-
Key workflows:
- Create accounts in the Chart of Accounts
- Record transactions with proper debit/credit entries
- View real-time financial dashboard
- Generate financial reports
# Login
POST /api/auth/login/
{
"username": "admin",
"password": "admin123"
}
# Refresh token
POST /api/auth/refresh/
{
"refresh": "your_refresh_token"
}# List accounts
GET /api/accounts/
# Create account
POST /api/accounts/
{
"code": "1000",
"name": "Cash",
"account_type": "asset",
"description": "Primary cash account"
}
# Get accounts by type
GET /api/accounts/by_type/
# Get chart summary
GET /api/accounts/chart_summary/# List transactions
GET /api/transactions/
# Create transaction
POST /api/transactions/
{
"reference": "TXN-001",
"date": "2025-01-15",
"description": "Cash sale",
"total_amount": 1000.00,
"entries": [
{
"account": "1",
"entry_type": "debit",
"amount": 1000.00
},
{
"account": "7",
"entry_type": "credit",
"amount": 1000.00
}
]
}
# Post transaction
POST /api/transactions/{id}/post_transaction/
# Get dashboard metrics
GET /api/transactions/dashboard_metrics/accountspro/
βββ backend/
β βββ accounts_project/ # Django project settings
β βββ accounts/ # Chart of accounts app
β βββ transactions/ # Transaction management app
β βββ users/ # User management app
β βββ requirements.txt
β βββ docker-compose.yml
β βββ Dockerfile
βββ frontend/
β βββ src/
β β βββ types/ # TypeScript type definitions
β β βββ services/ # API service layer
β β βββ App.tsx # Main application component
β β βββ ...
β βββ package.json
β βββ vite.config.ts
β βββ ...
βββ README.md
cd backend
python manage.py testcd frontend
npm run testBackend (.env)
SECRET_KEY=your-production-secret-key
DEBUG=False
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
DB_NAME=accounts_db_prod
DB_USER=prod_user
DB_PASSWORD=secure_password
DB_HOST=your-db-host
DB_PORT=5432Frontend (.env.production)
VITE_API_BASE_URL=https://yourdomain.com/api
VITE_APP_NAME=AccountsProdocker-compose -f docker-compose.prod.yml up -d- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 for Python code
- Use TypeScript for all frontend code
- Write tests for new features
- Update documentation for API changes
- Follow conventional commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Sage accounting software design
- Built with modern web development best practices
- Community feedback and contributions
- Create an issue for bug reports
- Discussions for feature requests
- Wiki for additional documentation
AccountsPro - Professional accounting made simple with modern technology.