mini-bookkeeping is a desktop application that a small business can use to manage their expenses. It was built with Electron, Vue.js and Vuetify. MariaDB (MySQL) is used as a Relational Database Management System. All queries were written in raw SQL, without any ORM.
- Install Node.js and npm
- Install MariaDB or MySQL
- Create database
mini_bookkeeping
- Clone repository and install dependencies by running next commands:
git clone https://github.com/valerachuk/mini-bookkeeping cd mini-bookkeeping npm install
- Go to
./mini-bookkeeping/src/configs
- Create a copy of
db.config.sample.js
- Rename it to
db.config.js
- Specify database username and password in
db.config.js
- Run
npm run electron:serve
to run ornpm run electron:build
to build - Open Administration section and click
Reset database
orReset database and fill it with test data
button. Then confirm the action in pop-up
Menu bar has next structure:
- Data management
- Employees
- Departments
- Shops
- TypesOfCosts
- Expenses
- Analytics
- Open Analytics
- Administration
- Open Admin Tools
Data management allows you to perform CRUD operations for each table.
- Table records
Create new
button. Opens form to create new records- Edit button. Opens form to edit a record
- Download button. Creates a report as a HTML file. Only available for
Expenses
- Delete button. Deletes record
- Pagination
Contains info about an expense
Allows you to create or edit a record from any table in database
Allows you to execute some analytics queries
- Total spent per type of cost
- Returns total spent per type of cost, ordered by total spent descending. Output columns: TypeOfCostId, TypeOfCostName, TotalSpent.
- Employees count per department
- Returns employees count per department, ordered by employees count descending. Output columns: DepartmentId, DepartmentName, EmployeesCount.
- Top 3 popular shops, by number of expenses
- Returns popular shops (by number of expenses) ordered by number of expenses descending, limited by 3. Output columns: ShopId, ShopName, NumberOfExpenses.
- Employee spent the least but more than average
- Find the employee who spent the least but more than average.Output columns: EmployeeId, FullName, TotalSpent, AvgPrice.
- Total spend per type of cost in current month
- Returns total spend per type of cost in current month, ordered by total spent descending. Output columns: TypeOfCostId, TypeOfCostName, ThresholdPerMonth, CurrentSpent.
- Employees that have ever made a spend for another department
- Find the employees that have ever made a spend for another department, ordering by their total spend descending. Output columns: EmployeeId, FullName, TotalSpent.
Allows you to reset database
Reset database
button. Drops current database and creates a new one with appropriate structureReset database and fill it with test data
button. Drops current database and creates a new one with appropriate structure, then fills it with some test data