A comprehensive financial management application built with Next.js, Drizzle ORM, and PostgreSQL.
- Dashboard: Overview of financial metrics
- Expense Management: Track and categorize business expenses
- Income Tracking: Monitor revenue streams
- Asset Management: Catalog and track company assets
- Investment Portfolio: Manage investments and track performance
- Document Storage: Store and organize financial documents
- Frontend: Next.js 15 with App Router
- Styling: Tailwind CSS with shadcn/ui components
- Backend: Next.js API Routes
- Database: PostgreSQL with Drizzle ORM
- Authentication: Better Auth
- Deployment: Docker
- Node.js 18+
- Docker and Docker Compose
- PostgreSQL (via Docker)
-
Clone the repository:
git clone <repository-url> cd finance-dashboard
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env # Update .env with your configuration
-
Start the database:
npm run db:up
-
Run database migrations:
npm run db:push
-
Seed the database with initial data:
npm run db:seed
-
Start the development server:
npm run dev
The application will be available at http://localhost:3000
├── app/ # Next.js app router pages
│ ├── dashboard/ # Dashboard pages
│ ├── sign-in/ # Sign in page
│ ├── sign-up/ # Sign up page
│ └── api/ # API routes
├── components/ # React components
├── db/ # Database schema and utilities
├── lib/ # Utility functions
├── scripts/ # Helper scripts
├── public/ # Static assets
├── styles/ # Global styles
└── drizzle/ # Database migrations
The application uses the following tables:
user
: User authentication and profilescategory
: Categorization for transactions, assets, and investmentstransaction
: Income and expense recordsasset
: Company assets (equipment, property, etc.)investment
: Investment portfoliodocument
: Financial documents
GET /api/dashboard
- Get financial summaryGET /api/categories
- Get all categoriesPOST /api/categories
- Create a new categoryGET /api/categories/:id
- Get a specific categoryPUT /api/categories/:id
- Update a categoryDELETE /api/categories/:id
- Delete a categoryGET /api/transactions
- Get all transactionsPOST /api/transactions
- Create a new transactionGET /api/transactions/:id
- Get a specific transactionPUT /api/transactions/:id
- Update a transactionDELETE /api/transactions/:id
- Delete a transactionGET /api/assets
- Get all assetsPOST /api/assets
- Create a new assetGET /api/assets/:id
- Get a specific assetPUT /api/assets/:id
- Update an assetDELETE /api/assets/:id
- Delete an assetGET /api/investments
- Get all investmentsPOST /api/investments
- Create a new investmentGET /api/investments/:id
- Get a specific investmentPUT /api/investments/:id
- Update an investmentDELETE /api/investments/:id
- Delete an investmentGET /api/documents
- Get all documentsPOST /api/documents
- Create a new documentGET /api/documents/:id
- Get a specific documentPUT /api/documents/:id
- Update a documentDELETE /api/documents/:id
- Delete a document
-
Build the Docker image:
npm run docker:build
-
Start the application:
npm run docker:up
-
Stop the application:
npm run docker:down
- Generate migrations:
npm run db:generate
- Push schema changes:
npm run db:push
- Start database studio:
npm run db:studio
- Lint code:
npm run lint
- Format code:
npm run format
(if configured)
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a pull request
This project is licensed under the MIT License.