English | 简体中文
A desktop application built with Wails v2 + Vue 3 + Element Plus for elderly information management, opinion polling, and issue collection.
- Go 1.21+
- Wails v2
- GORM (SQLite)
- bcrypt password hashing
- Vue 3.4+
- TypeScript
- Element Plus UI
- ECharts
- Pinia state management
- Vue Router
pension-system/
├── main.go # Application entry
├── app.go # Application context
├── go.mod # Go module definition
├── wails.json # Wails configuration
├── database/ # Database configuration
│ └── db.go
├── models/ # Data models
│ ├── user.go # User model
│ ├── elderly.go # Elderly model
│ ├── survey.go # Survey model
│ └── issue.go # Issue model
├── controllers/ # Controllers
│ ├── auth.go # Authentication
│ ├── data.go # Data management
│ ├── survey.go # Opinion surveys
│ └── issue.go # Issue collection
├── utils/ # Utility functions
│ └── crypto.go # Password hashing
└── frontend/ # Frontend code
├── index.html
├── package.json
├── vite.config.ts
├── tsconfig.json
└── src/
├── main.ts
├── App.vue
├── api/ # API wrappers
│ └── index.ts
├── router/ # Routing configuration
│ └── index.ts
├── store/ # State management
│ └── user.ts
└── views/ # Page components
├── Login.vue
├── Home.vue
├── DataSummary.vue
├── DataManage.vue
├── DataForm.vue
├── Survey.vue
└── Issue.vue
- User login/registration
- Role-based access control (Administrator, Operator, Regular User)
- Default admin account: admin / admin123
- Total elderly count statistics
- Gender distribution chart
- Age distribution chart
- Health status distribution
- Care level distribution
- Elderly information CRUD
- Data search and pagination
- Data import/export
- Elderly information form
- Form validation
- Data saving
- Create surveys
- Publish/close surveys
- View voting results
- Chart visualization
- Submit issues
- Issue categorization and priority
- Issue replies
- Issue closure
- Go 1.21 or later
- Node.js 18 or later
- Wails CLI
go install github.com/wailsapp/wails/v2/cmd/wails@latestcd D:\Workspace\PensionSystem\pension-system
go mod downloadcd frontend
npm installwails devwails buildThe application uses SQLite. The database file pension_system.db is created automatically on first run.
users- User tableelderly- Elderly information tablesurveys- Survey tablesurvey_votes- Survey vote tableissues- Issue collection table
- Username: admin
- Password: admin123
- Role: Administrator
- Add the method to the appropriate controller under
controllers/ - Register the controller in the
Bindcall inmain.go - Add the API call method in
frontend/src/api/index.ts
- Create a Vue component under
frontend/src/views/ - Add a route in
frontend/src/router/index.ts - Add a menu item in
frontend/src/views/Home.vue
This project is licensed under the GPL-3.0 License.