Reduce the on-call
Reduce the on-call. When your boss call you when you are sleep or your team members ask some basic questions, it can help you accept the phone call or whatsApp call. You can upload your daily or knowledge on the local DB and it can answer the question based on the information you have put on the DB.
The project now includes a small web application that lets you collect unstructured knowledge items such as text, markdown, images, audio or video files. Every upload is stored on the local filesystem and indexed in a relational database together with:
- The group it belongs to (e.g.
Work,Learn). - A hierarchical folder path (e.g.
Work/2024-04-30/Daily). - A set of tags (e.g.
meeting-notes,design). - The storage location and the original text (when text or markdown is provided).
- Create and list groups and folders to mirror how you want to organise the knowledge base.
- Upload plain text/markdown or attach files (images, documents, video, audio, etc.).
- Automatically persists the binary assets to
backend/storage/while indexing metadata in a SQLite database (backend/data/knowledge.db). - Browse entries per group, preview captured text, open stored assets directly from the UI, and review applied tags.
- Responsive, tech-themed interface optimised for desktop and tablet screens.
backend/
app/
main.py # FastAPI application
database.py # SQLAlchemy configuration and session helpers
models.py # ORM models for groups, folders, entries, tags
schemas.py # Pydantic request/response schemas
storage.py # Utilities for saving text/files to disk
data/ # Created at runtime, stores the SQLite database
storage/ # Created at runtime, stores uploaded assets
frontend/
index.html # Tech-styled UI
styles.css # Visual design tokens and layout
app.js # Frontend logic using the REST API
requirements.txt # Backend dependencies
-
Install dependencies
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt -
Start the backend
uvicorn backend.app.main:app --reload
-
Open the UI
Visit http://localhost:8000 to use the web application. All API endpoints are namespaced at the root (e.g.
POST /groups,POST /entries) while the static assets are served from/uiand stored files from/storage.
The backend uses SQLite for ease of local development and to satisfy the requirement of a locally hosted database. SQLAlchemy models can be migrated to MySQL or Postgres with minimal changes by updating the connection string in backend/app/database.py.
Fuhao Ruan