Skip to content

michael1018/OpsPilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Full Project README (Frontend + Backend)

OpsPilot Project

Project Overview

OpsPilot is a full-stack application for managing users.
It includes:

  • Backend: Python, FastAPI-style custom API layer, Async SQLAlchemy, PostgreSQL
  • Frontend: Vue.js + iView UI library
  • Features:
    • User CRUD (Create, Read, Update, Delete)
    • Inline editable tables
    • Modal dialogs for add/edit
    • User login functionality
    • Soft-delete for users
    • API validation and error handling

Project Structure

OpsPilot/
├─ backend/
│ ├─ src/
│ │ ├─ webapi/ # API endpoints
│ │ │ └─ users_api.py
│ │ ├─ service/ # Business logic layer
│ │ │ └─ users_service.py
│ │ ├─ database/ # Async database session
│ │ ├─ models/ # SQLAlchemy ORM models
│ │ └─ core/ # API core, server, exceptions
│ ├─ requirements.txt
│ └─ ...
├─ frontend/
│ ├─ public/
│ ├─ src/
│ │ ├─ api/
│ │ │ └─ users-api.js
│ │ ├─ components/
│ │ │ └─ tables/
│ │ ├─ view/
│ │ │ └─ Users.vue
│ │ ├─ App.vue
│ │ └─ main.js
│ ├─ package.json
│ └─ ...
└─ README.md


Prerequisites

  • Backend
    • Python >= 3.10
    • PostgreSQL
  • Frontend
    • Node.js >= 18
    • npm or yarn

Backend Setup

  1. Install Python dependencies:
cd backend
pip install -r requirements.txt
  1. Configure database connection in database/aio_session.py.
  2. Run backend server:
python -m src.webapi.main

Frontend Setup

  1. Install dependencies:
cd frontend
npm install
# or yarn install
  1. Run dev server:
npm run serve
# or yarn serve

API Endpoints

Method Endpoint Description
GET /users_pages Fetch paginated users
GET /users/{id} Fetch user by ID
POST /users_create Create new user
PUT /users_update Update existing user
DELETE /users_delete Soft delete user
POST /login Login user (returns token)

Frontend Features

  • Editable user table with inline editing
  • Add / Edit modal dialogs
  • Soft-delete with confirmation
  • Search users by name
  • Error messages displayed for API failures

Notes

  • Birthdate must be YYYY-MM-DD.
  • Sex stored as integer (1 = Male, 2 = Female) but displayed as text.
  • Modal validation is handled by backend.
  • Password cannot be edited in "Edit User" modal.
  • Soft delete sets is_deleted = True without removing the database record.

Recommended Browser

  • Latest Chrome or Edge

About

Full-stack user management application with Sanic backend and Vue frontend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors