Kassa is an enterprise-grade financial dashboard application designed for monitoring corporate cash flow, tracking transactions, and managing account settings. The application features support for localization (English and Bahasa Indonesia) and base currency conversion (USD and IDR).
The application is structured as a monorepo consisting of a Next.js frontend and a FastAPI backend.
- Frontend: Next.js (App Router), React, Recharts, TailwindCSS / Custom CSS, Lucide Icons.
- Backend: FastAPI (Python), Motor (Asynchronous MongoDB Client), Pydantic.
- Database: MongoDB.
kassa/
├── app/ # Next.js page layouts and global styles
├── components/ # Reusable UI components (Sidebar, Navbar, Tables, Charts)
├── data/ # Type definitions and interfaces
├── lib/ # Helper utilities (currency conversion, localization)
├── public/ # Static assets (images, logos)
├── backend/ # FastAPI application
│ ├── main.py # API server entrypoint and route handlers
│ ├── database.py # MongoDB client configuration
│ ├── models.py # Pydantic schemas for request/response validation
│ └── requirements.txt # Python dependency specifications
└── package.json # Frontend dependencies and scripts
Ensure you have the following software installed:
- Node.js (v18 or higher)
- pnpm (v8 or higher)
- Python (v3.10 or higher)
- MongoDB instance (local or Atlas)
-
Navigate to the backend directory:
cd backend -
Create a
.envfile based on.env.example:cp .env.example .env
-
Configure your MongoDB connection string in
.env:MONGO_URL=mongodb://localhost:27017/kassa_db
-
Create and activate a Python virtual environment:
python -m venv venv # On Windows: .\venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install backend dependencies:
pip install -r requirements.txt
- Navigate to the root directory and install dependencies:
pnpm install
From the backend directory (ensure the virtual environment is active):
python main.pyThe backend API server will run at http://127.0.0.1:8000.
From the root directory:
pnpm devThe Next.js development server will run at http://localhost:3000.
To create an optimized production build of the frontend, run:
pnpm buildFastAPI automatically generates interactive Swagger documentation. Once the backend server is running, you can access the API documentation at:
- Swagger UI:
http://127.0.0.1:8000/docs - Redoc:
http://127.0.0.1:8000/redoc
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Server health check |
GET |
/api/status |
Database connectivity status |
GET |
/api/transactions |
Retrieve all transactions (supports optional filters) |
POST |
/api/transactions |
Create a new transaction |
GET |
/api/transactions/{id} |
Retrieve details of a specific transaction |
PUT |
/api/transactions/{id} |
Update an existing transaction |
DELETE |
/api/transactions/{id} |
Delete a specific transaction |
GET |
/api/transactions/stats/summary |
Retrieve aggregated financial metrics |