Skip to content
AD-coderrPublic

About

IT asset management app: track devices and employees. FastAPI + SQLAlchemy backend with a clean web UI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

AssetFlow

Tests Python FastAPI License: MIT

AssetFlow is a lightweight IT asset management app: keep track of laptops, monitors, phones and other devices, and the employees who use them. It's a FastAPI + SQLAlchemy backend with a clean, dependency-free web UI.

Assets view

Assignment history for an asset

Dark mode & add-asset dialog

Add asset dialog in dark mode

Features

  • Assets — create, edit, delete and search devices with tag, type, brand, model, serial number, location and status (Available, Assigned, In repair, Retired)
  • Employees — manage the people assets get assigned to
  • Assignments — check an asset out to an employee and back in, with a full history per asset and per employee
  • Business rules — only available assets can be assigned; an assigned asset must be returned before it can be retired, deleted or re-assigned; an employee holding assets can't be deleted
  • Dashboard stats — totals and status counts at a glance
  • Validation — required fields checked in the UI and API; duplicate asset tags, serial numbers or emails return 409 Conflict
  • Light & dark mode, responsive down to phone widths
  • Interactive API docs via Swagger UI at /docs

Tech stack

Layer Tools
Backend Python, FastAPI, SQLAlchemy 2, Pydantic 2
Database SQLite (configurable via ASSETFLOW_DATABASE_URL)
Frontend Plain HTML, CSS and JavaScript (no build step)
Testing pytest, GitHub Actions

Getting started

git clone https://github.com/AD-coderr/AssetFlow.git
cd AssetFlow/backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
uvicorn app.main:app --reload

Then open:

The SQLite database is created automatically at backend/assetflow.db.

API

Resource Endpoints
Assets GET/POST /assets, GET/PUT/DELETE /assets/{id}
Employees GET/POST /employees, GET/PUT/DELETE /employees/{id}
Assignments POST /assets/{id}/assign, POST /assets/{id}/return, GET /assets/{id}/assignments, GET /employees/{id}/assignments, GET /assignments?active=true
Users GET /users (read-only; never returns password hashes)

Project structure

AssetFlow/
├── backend/
│   ├── app/
│   │   ├── database/   # engine, session, get_db dependency
│   │   ├── models/     # SQLAlchemy models
│   │   ├── routes/     # API endpoints
│   │   ├── schemas/    # Pydantic request/response models
│   │   └── main.py     # app entry point, serves the UI at /ui
│   └── tests/
└── frontend/           # web UI (index.html, styles.css, app.js)

Running tests

cd backend
pytest

Roadmap

  • Assign assets to employees (check-out / check-in history)
  • Authentication and roles
  • CSV import / export
  • Docker setup

License

MIT

About

IT asset management app: track devices and employees. FastAPI + SQLAlchemy backend with a clean web UI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages