PThorpe92 / rfid-backend

RFID attendence system for MVCF. Web app in SolidJS, Tauri desktopUI, and Actix-Web backend.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RFID based attendance system built for MVCF. Point of sale, inventory and time clock system is in development.

Rust: Actix-Web + SqlX/Sea-ORM - Backend

Typescript: SolidJS/DaiseyUI - Frontend

Typescript: SolidJS/DaiseyUI + Tauri/SqlX/Tokio - desktop webUI Client

Rust msrv: 1.76

Datebase:

  • Backend: Postgres

  • Desktop Client: Sqlite

To use this repository:

Create a .env file in the root directory with the following fields:

HOST PORT DATABASE_URL #example: postgres://mvcf:dev@localhost:5432/mvcf_scanner UPLOAD_FILE_PATH= #recommended: .../{repository root}/frontend/imgs/

JWT_SECRET_KEY=" #recommended: generate a key for the JWT for the auth

Upload filepath is because the front end is currently setup to look for images in the frontened/imgs directory. They are currently uploaded to the back-end, which writes temp files then re-names them in the manner of mv to the value of the resident ID.png, in UPLOAD_FILE_PATH in the .env file

NOTE: This will not work if the directory is not on the same partition.

clone the repository 

run `docker compose up -d`

run `cargo run` in the root directory

cd into the `frontend` directory and run `npm install`

run `npm run dev` and `npx tailwindcss -o ./src/styles.css --watch` in separate terminals

TESTING:

cd testapi

cargo test

About

RFID attendence system for MVCF. Web app in SolidJS, Tauri desktopUI, and Actix-Web backend.


Languages

Language:TypeScript 51.0%Language:Rust 33.1%Language:CSS 14.5%Language:Python 0.7%Language:PLpgSQL 0.2%Language:HTML 0.2%Language:JavaScript 0.2%Language:Dockerfile 0.1%