-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start rewriting with SvelteAdmin instead of custom stuff
- Loading branch information
1 parent
9f4c7a0
commit c6e1f04
Showing
65 changed files
with
2,053 additions
and
5,788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,3 @@ node_modules | |
!.env.example | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
|
||
static/bootstrap* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
{ | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte"], | ||
"pluginSearchDirs": ["."], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} | ||
{ | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte"], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,38 @@ | ||
# 🍎 Compotes 🍏 | ||
# create-svelte | ||
|
||
A small application to visualise bank operations in graphs and plots. | ||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). | ||
|
||
# 🧮 | ||
## Creating a project | ||
|
||
> This is the second version of the main app that was previously built with PHP and Symfony. | ||
> | ||
> The new app is built in [Rust](https://www.rust-lang.org/) with [Tauri](https://tauri.studio/) for the backend, and uses [Typescript](https://www.typescriptlang.org/) and [Svelte](https://svelte.dev/) for the frontend part. | ||
If you're seeing this, you've probably already done this step. Congrats! | ||
|
||
![App screenshot](docs/capture1.png) | ||
|
||
## Install | ||
|
||
The project is not even in beta for now. | ||
|
||
You can still find latest nightly builds on the [Actions](https://github.com/Orbitale/Compotes/actions) page, if you check out the latest successful action marked by a "☑️" mark (if there is one at least). | ||
|
||
The latest builds can also be found on [nightly.link](https://nightly.link/Orbitale/Compotes/workflows/main.yaml/rewrite) | ||
|
||
## Project setup | ||
|
||
If you want to use the in-development project, you can compile it by doing what is explained in the following steps. | ||
|
||
### Requirements | ||
|
||
- [Rust](https://www.rust-lang.org/tools/install) | ||
- [Node.js](https://nodejs.org/en/download/) | ||
- [Yarn](https://yarnpkg.com/getting-started/install) (preferred by the Tauri team, so expect better compatibility) | ||
- For Linux users: | ||
- Follow [this guide](https://tauri.studio/docs/getting-started/setting-up-linux#1-system-dependencies) to install the **system dependencies** that are mandatory. | ||
- For Windows users: | ||
- [Webview2](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section) | ||
- For MacOS users: | ||
- XCode | ||
- The GNU C Compiler, installable via `brew install gcc` | ||
|
||
### Install | ||
```bash | ||
# create a new project in the current directory | ||
npm create svelte@latest | ||
|
||
# create a new project in my-app | ||
npm create svelte@latest my-app | ||
``` | ||
yarn install | ||
``` | ||
|
||
> You do not need to install Rust dependencies, since running `cargo` commands like `cargo run` will automatically download and compile dependencies. | ||
|
||
### Run the app in dev mode | ||
## Developing | ||
|
||
``` | ||
yarn tauri dev | ||
``` | ||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
|
||
### Compile for production | ||
```bash | ||
npm run dev | ||
|
||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
``` | ||
yarn tauri build | ||
``` | ||
|
||
> This command builds the app in the `src-tauri/target/release/` directory. | ||
|
||
## Import a database from v1 | ||
## Building | ||
|
||
- Run `make dump` in the v1 app | ||
- Get the `var/dump_***.sql` file that was just generated | ||
- Install `mysql2sqlite` via this script: | ||
```bash | ||
wget https://raw.githubusercontent.com/dumblob/mysql2sqlite/master/mysql2sqlite | ||
``` | ||
- Run it on the sql file you got and create your database: | ||
```bash | ||
./mysql2sqlite dump_***.sql | sqlite3 data.db3 | ||
``` | ||
- Pray it works 🙏 | ||
To create a production version of your app: | ||
|
||
### Roadmap | ||
|
||
Since the entire app is being rewritten, lots of stuff have to be re-implemented. | ||
```bash | ||
npm run build | ||
``` | ||
|
||
> The "☑️" mark means the feature is implemented, while the "⬜️" mark means the feature is waiting for implementation. | ||
You can preview the production build with `npm run preview`. | ||
|
||
- Core features: | ||
- ☑️ Create the Tauri app | ||
- ☑️ Create the Svelte frontend with it | ||
- ☑️ List operations | ||
- ☑️ Allow sorting operations by some fields | ||
- ☑️ Allow filtering operations | ||
- ☑️ Allow saving current filter to be reused in graphs | ||
- ☑️ Allow filtering operations that have no tags | ||
- ☑️ Allow ignoring an operation in graphs calculations | ||
- ☑️ Tags CRUD | ||
- ☑️ Tag rules CRUD | ||
- ☑️ Bank accounts CRUD | ||
- ☑️ Edit bank account details | ||
- ☑️ Import operations from CSV file | ||
- ☑️ Add tags to operations directly from the list | ||
- ☑️ Sync operations for triage | ||
- ☑️ Sync operations tags with tag rules | ||
- ⬜️ Add the graphs that are at the core of this app 😅 | ||
- ☑️ Allow using saved filters for graphs | ||
- ⬜️ Allow creating and saving custom graphs | ||
- Additional features that might be cool: | ||
- ⬜️ Allow customizing graphs | ||
- ⬜️ Config panel | ||
- ⬜️ Allow customizing database, for multiple database usage | ||
- ⬜️ Allow exporting/importing whole database | ||
- ⬜️ User account system for multi-user usage | ||
- ⬜️ Encrypt entire database with a password/passphrase for safety | ||
- ⬜️ Store filters to the database instead of `localStorage` | ||
- Some things are quite buggy and the app needs improvements too: | ||
- ☑️ Check why we have to use `location.reload()` because svelte stores don't update the paginated tables => I actually used SvelteKit's `goto()` from `$app/navigation` and it works great 👌 | ||
- ⬜️ Use a `select2` or similar for tags selection | ||
- ⬜️ Add the ability to create a Tag Rule based on an Operation in the operations list | ||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"build": { | ||
"beforeBuildCommand": "yarn run build", | ||
"beforeDevCommand": "yarn run dev", | ||
"devPath": "http://127.0.0.1:5173", | ||
"distDir": "./target/frontend-build" | ||
}, | ||
"package": { | ||
"productName": "compotes", | ||
"version": "0.1.0" | ||
}, | ||
"tauri": { | ||
"allowlist": { | ||
"all": true | ||
}, | ||
"bundle": { | ||
"active": true, | ||
"category": "DeveloperTool", | ||
"copyright": "", | ||
"deb": { | ||
"depends": [] | ||
}, | ||
"externalBin": [], | ||
"icon": [ | ||
"icons/32x32.png", | ||
"icons/128x128.png", | ||
"icons/[email protected]", | ||
"icons/icon.icns", | ||
"icons/icon.ico" | ||
], | ||
"identifier": "io.orbitale.compotes", | ||
"longDescription": "", | ||
"macOS": { | ||
"entitlements": null, | ||
"exceptionDomain": "", | ||
"frameworks": [], | ||
"minimumSystemVersion": "", | ||
"signingIdentity": null | ||
}, | ||
"resources": [], | ||
"shortDescription": "", | ||
"targets": ["msi", "deb"], | ||
"windows": { | ||
"certificateThumbprint": null, | ||
"digestAlgorithm": "sha256", | ||
"timestampUrl": "" | ||
} | ||
}, | ||
"security": { | ||
"csp": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; object-src 'none'; require-trusted-types-for 'script';" | ||
}, | ||
"updater": { | ||
"active": false | ||
}, | ||
"windows": [ | ||
{ | ||
"fullscreen": false, | ||
"height": 800, | ||
"resizable": true, | ||
"title": "Compotes", | ||
"width": 1024 | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.