English | 简体中文
A lightweight, easy-to-use, BS-architecture accounting management system with clearly defined permissions, enabling standardized recording of revenue and expense transactions, unified voucher management, and multi-dimensional data analysis.
- User Authentication - JWT token auth, lockout mechanism on repeated password failures
- Transaction Management - Registration, approval, and querying of income/expense records
- Expense Categories - Flexible expense category management
- Statistical Reports - Multi-dimensional data analysis and visualization
- Access Control - Three roles: Admin / Finance / Employee
- Operation Logs - Complete operation audit trail
- Version History - System version update information display
- Go 1.18+
- Gin web framework
- GORM (MySQL)
- JWT authentication
- bcrypt password hashing
- Vue 3.4+
- TypeScript
- Element Plus UI
- ECharts
- Pinia state management
- Vue Router
- MySQL 8.0+
account-management-system/
├── backend/ # Backend code
│ ├── main.go # Application entry
│ ├── go.mod # Go module definition
│ ├── config/ # Configuration
│ │ ├── config.go # Config struct
│ │ └── config.yaml # YAML configuration file
│ ├── cmd/ # CLI tools
│ │ └── recreate_db/ # Database rebuild tool
│ ├── database/ # Database connection
│ ├── models/ # Data models
│ │ ├── user.go # User model
│ │ ├── transaction.go # Transaction model
│ │ ├── category.go # Category model
│ │ ├── project.go # Project model
│ │ ├── department.go # Department model
│ │ ├── operation_log.go # Operation log model
│ │ └── attachment.go # Attachment model
│ ├── controllers/ # Controllers
│ │ ├── auth.go # Auth controller
│ │ ├── user.go # User controller
│ │ ├── transaction.go # Transaction controller
│ │ ├── category.go # Category controller
│ │ ├── project.go # Project controller
│ │ ├── department.go # Department controller
│ │ ├── statistics.go # Statistics controller
│ │ ├── log.go # Log controller
│ │ └── attachment.go # Attachment controller
│ ├── middlewares/ # Middlewares
│ │ ├── auth.go # JWT auth middleware
│ │ ├── cors.go # CORS middleware
│ │ └── logger.go # Logger middleware
│ ├── routes/ # Route configuration
│ ├── utils/ # Utility functions
│ │ ├── common.go # Common utilities
│ │ ├── crypto.go # Crypto utilities
│ │ ├── jwt.go # JWT utilities
│ │ └── oss.go # OSS storage utilities
│ ├── sql/ # SQL scripts
│ │ ├── 01_create_database.sql
│ │ ├── 02_create_tables.sql
│ │ ├── 03_init_data.sql
│ │ ├── 04_fix_department_unique_index.sql
│ │ └── 05_add_payment_method.sql
│ └── uploads/ # File upload directory
├── frontend/ # Frontend code
│ ├── src/
│ │ ├── main.ts # Application entry
│ │ ├── App.vue # Root component
│ │ ├── api/ # API wrappers
│ │ ├── router/ # Routing configuration
│ │ ├── store/ # State management
│ │ ├── components/ # Shared components
│ │ ├── utils/ # Utilities
│ │ │ ├── request.ts # HTTP request wrapper
│ │ │ └── format.ts # Formatting utilities
│ │ └── views/ # Page components
│ │ ├── Dashboard.vue # Home dashboard
│ │ ├── Login.vue # Login page
│ │ ├── transaction/ # Transaction management
│ │ ├── category/ # Expense categories
│ │ ├── statistics/ # Statistical reports
│ │ └── settings/ # System settings
│ └── dist/ # Build output
├── docs/ # Project documentation
│ ├── Requirements_Specification.md
│ ├── API_Documentation.md
│ ├── User_Manual.md
│ ├── Deployment_Guide.md
│ └── Resubmission_Feature.md
└── README.md # Project README
- Stat cards for total income, total expense, net balance, and record count
- Recent transaction list
- Project-based pie chart
- Income Registration - Finance staff register income records
- Expense Registration - Finance staff register expense records
- Transaction Approval - Administrators approve transactions
- Transaction List - View and filter transactions
- CRUD operations on categories
- Supports fuzzy search
- Multi-dimensional analysis (project/personnel/category)
- Visualized charts
- User Management - User CRUD and permission assignment (Admin)
- Department Management - Department information management (Admin)
- Project Management - Project information management (Admin)
- Operation Logs - User operation records (Admin/Finance)
- Account Management - Personal account maintenance
- Version History - System version update information
| Role | Permissions |
|---|---|
| Admin (ADMIN) | Full permissions, including user management, department management, project management, and transaction approval |
| Finance (FINANCE) | Transaction registration, expense categories, statistical reports, and operation log viewing |
| Employee (EMPLOYEE) | View personal transaction records, account management |
- Go 1.18+
- Node.js 18+
- MySQL 8.0+
# Create database
mysql -u root -p < backend/sql/01_create_database.sql
# Create table structure
mysql -u root -p < backend/sql/02_create_tables.sql
# Initialize base data
mysql -u root -p < backend/sql/03_init_data.sqlBackend:
cd backend
go mod downloadFrontend:
cd frontend
npm installEdit backend/config/config.yaml:
server:
port: "8080"
mode: debug
database:
host: localhost
port: 3306
database: account_management
username: root
password: your_password
jwt:
secret: your_jwt_secret_key
expire: 86400Start backend:
cd backend
go run main.goStart frontend:
cd frontend
npm run devBuild backend (Linux x86_64):
cd backend
GOOS=linux GOARCH=amd64 go build -o account-management main.goBuild frontend:
cd frontend
npx vite build| Username | Password | Role |
|---|---|---|
| admin | admin123 | Administrator |
- Added payment method field to support multiple payment options
- Expense registration page allows adding new payment methods directly
- Implemented resubmission of rejected records
- Optimized amount display with thousands separators
- Unified formatting utility functions
- Improved table column width display
- Refined version info UI, opened version history viewing permission
- Optimized login page layout with a two-column design
- Fixed record count display issue on the dashboard
- Updated deployment documentation
- Initial stable release
- Complete accounting management system features
- Requirements Specification (Chinese)
- API Documentation (Chinese)
- Deployment Guide (Chinese)
- User Manual (Chinese)
- Resubmission Feature Notes (Chinese)
This project is licensed under the GPL-3.0 License.