CLSSWJZ is a complete personal finance management system consisting of:
- Backend Service (Current Repository)
- Mobile App: CLSSWJZ-APP;Downloads: Latest Release(Android/Windows/Linux)
- Multi-book Management
- Fund Account Management
- Income/Expense Recording
- Category Management
- Merchant Management
- User Collaboration
- Multi-language Support (Simplified Chinese, Traditional Chinese, English)
- Cross-platform Support
- Create a docker-compose.yml:
version: '3.8'
services:
api:
image: clssw1004/clsswjz-server:0.0.1
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- API_PREFIX=api
- DB_TYPE=sqlite # or mysql
- DATA_PATH=/data # SQLite data path
volumes:
- ./data:/data # Mount SQLite data directory
restart: unless-stopped
# Optional: MySQL Database
db:
image: mysql:8
environment:
- MYSQL_ROOT_PASSWORD=your_password
- MYSQL_DATABASE=clsswjz
volumes:
- mysql_data:/var/lib/mysql
ports:
- "3306:3306"
restart: unless-stopped
volumes:
mysql_data:
- Start the service:
docker-compose up -d
- Clone the repository:
git clone https://github.com/clssw1004/clsswjz-server.git
cd clsswjz-server
- Build the image:
docker build -t clsswjz-server .
- Create docker-compose.yml (same as above, but change image to your built one)
- Start the service:
docker-compose up -d
# Start development server with watch mode
npm run start:dev
# Run tests
npm run test
# Run e2e tests
npm run test:e2e
# Generate API documentation
npm run doc:generate
# Run mock data script
npm run mock:data
Create a .env
file in the root directory:
# Server Configuration
PORT=3000 # Server port
API_PREFIX=api # API prefix
NODE_ENV=development # Environment: development/production
# Database Configuration (MySQL)
DB_TYPE=mysql # Database type: mysql/sqlite
DB_HOST=localhost # Database host
DB_PORT=3306 # Database port
DB_USERNAME=root # Database username
DB_PASSWORD=password # Database password
DB_DATABASE=clsswjz # Database name
# SQLite Configuration
# DB_TYPE=sqlite
# DATA_PATH=/data # SQLite data directory
When using Docker, configure environment variables in:
- docker-compose.yml:
services:
api:
environment:
- NODE_ENV=production
- PORT=3000
- DB_TYPE=sqlite
- DATA_PATH=/data
- Environment file:
# Create .env file
cp .env.example .env
docker-compose --env-file .env up -d
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.