Skip to content

lecrix/auto-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

76 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


AutoRepo

A Git-style vehicle maintenance tracking system for car enthusiasts.

็ฎ€ไฝ“ไธญๆ–‡ โ€ข Features โ€ข Quick Start โ€ข Architecture โ€ข Deployment

Version License Python FastAPI WeChat MongoDB


What is AutoRepo?

AutoRepo transforms vehicle maintenance tracking into an intuitive, developer-friendly experience by borrowing concepts from Git version control:

Git Concept AutoRepo Equivalent
Repository Your Vehicle
Commit Maintenance/Repair Record
Issue Scheduled Maintenance Task
HEAD Current Status (Mileage/Condition)

Perfect for car enthusiasts who want to:

  • Track every modification, repair, and maintenance
  • Monitor total investment and cost breakdown
  • Document with photos (up to 9 per record)
  • Export professional PDF reports
  • Never lose your vehicle's history

Features

Core Functionality

  • Git-Style Timeline โ€” Visual commit history of all vehicle changes
  • Multi-Vehicle Support โ€” Manage multiple cars in one app
  • Cost Tracking โ€” Labor costs, parts fees, automatic totals
  • Image Upload โ€” Up to 9 photos per maintenance record
  • PDF Export โ€” Professional reports for insurance or resale
  • Search & Filter โ€” By type, date range, mileage, or keywords
  • Issue Tracking โ€” Plan maintenance tasks with priorities

User Experience

  • Dark Mode โ€” Auto-detects system preference
  • Real-time Sync โ€” WeChat Cloud Run powered
  • Secure โ€” JWT authentication, data isolation per user
  • Native Feel โ€” Custom navigation, smooth animations
  • Swipe Actions โ€” Swipe to delete vehicles and tasks

Screenshots


Home

Home (Dark)

Add Vehicle

Vehicle Detail

Timeline

Add Record

Stats - Cost

Stats - Issues

Add Reminder

Settings

Help

PDF Export

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     WeChat Mini Program                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚  โ”‚  Timeline   โ”‚  โ”‚  Dashboard  โ”‚  โ”‚  Settings   โ”‚              โ”‚
โ”‚  โ”‚   (Repo)    โ”‚  โ”‚   (Stats)   โ”‚  โ”‚   (Theme)   โ”‚              โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚         โ”‚                โ”‚                                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”                               โ”‚
โ”‚  โ”‚       api.ts (HTTP Client)    โ”‚                               โ”‚
โ”‚  โ”‚   โ€ข JWT Auth โ€ข Retry Logic    โ”‚                               โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚ wx.cloud.callContainer
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   WeChat Cloud Run (Docker)                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚                    FastAPI Backend                        โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ /repos โ”‚  โ”‚/commitsโ”‚  โ”‚/issues โ”‚  โ”‚ /auth  โ”‚          โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜          โ”‚   โ”‚
โ”‚  โ”‚       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ”‚   โ”‚
โ”‚  โ”‚                       โ”‚                                    โ”‚   โ”‚
โ”‚  โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                          โ”‚   โ”‚
โ”‚  โ”‚              โ”‚   MongoDB/Mock  โ”‚                          โ”‚   โ”‚
โ”‚  โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                          โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tech Stack

Layer Technology
Frontend TypeScript, SCSS, WeChat Mini Program
Backend Python 3.9+, FastAPI, Pydantic
Database MongoDB (Motor async driver)
Auth JWT + WeChat Login
PDF ReportLab (Chinese font support)
Deployment Docker, WeChat Cloud Run

Quick Start

Prerequisites

  • Python 3.9+
  • WeChat Developer Tools
  • (Optional) Docker, MongoDB

1. Backend Setup

# Clone the repository
git clone https://github.com/lecrix/auto-repo.git
cd auto-repo/backend

# Install dependencies
pip install -r requirements.txt

# Create .env file
cp .env.example .env
# Edit .env with your credentials

# Run development server
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Environment Variables (.env):

WECHAT_APPID=your_wechat_appid
WECHAT_SECRET=your_wechat_secret
JWT_SECRET=your-random-secret-key-at-least-32-characters
MONGO_URL=mongodb://localhost:27017  # Optional, defaults to MockDB

Without MongoDB, the system automatically uses MockDB (file-based) for local development.

2. Frontend Setup

  1. Open WeChat Developer Tools
  2. Import miniprogram/ directory
  3. Set AppID (or use test mode)
  4. Update config in miniprogram/config.ts:
    const CURRENT_MODE: 'dev' | 'device' | 'prod' = 'dev'
  5. Compile and preview

Deployment

WeChat Cloud Run (Recommended)

See docs/DEPLOY.md for detailed instructions.

Key Benefits:

  • No domain registration/ICP required
  • Auto-scaling (scale to zero when idle)
  • Built-in HTTPS
  • Direct internal network access

Project Structure

auto-repo/
โ”œโ”€โ”€ backend/                 # FastAPI Backend
โ”‚   โ”œโ”€โ”€ main.py              # App entrypoint
โ”‚   โ”œโ”€โ”€ auth.py              # JWT + WeChat login
โ”‚   โ”œโ”€โ”€ routes.py            # API endpoints
โ”‚   โ”œโ”€โ”€ models.py            # Pydantic schemas
โ”‚   โ”œโ”€โ”€ database.py          # MongoDB connection
โ”‚   โ””โ”€โ”€ mock_db.py           # Development fallback DB
โ”‚
โ”œโ”€โ”€ miniprogram/             # WeChat Mini Program
โ”‚   โ”œโ”€โ”€ pages/               # UI pages
โ”‚   โ”œโ”€โ”€ components/          # Reusable components
โ”‚   โ””โ”€โ”€ services/            # API client, auth
โ”‚
โ”œโ”€โ”€ docs/                    # Documentation
โ”‚   โ”œโ”€โ”€ DEPLOY.md            # Deployment guide
โ”‚   โ”œโ”€โ”€ FEATURE_SUMMARY.md   # Feature summary
โ”‚   โ”œโ”€โ”€ TESTING_GUIDE.md     # Testing guide
โ”‚   โ””โ”€โ”€ WORK_SUMMARY.md      # Development history
โ”‚
โ”œโ”€โ”€ AGENTS.md                # AI assistant guide
โ””โ”€โ”€ CONTRIBUTING.md          # Contribution guide

API Overview

Endpoint Method Description
/auth/login POST WeChat code โ†’ JWT token
/repos GET/POST List/Create vehicles
/repos/{id} GET/PUT/DELETE Vehicle CRUD
/commits GET/POST List/Create records
/commits/{id} GET/PUT/DELETE Record CRUD
/repos/{id}/issues GET/POST Maintenance tasks
/issues/{id} GET/PATCH/DELETE Task CRUD
/repos/{id}/stats GET Cost statistics
/repos/{id}/export/pdf-base64 GET PDF export

Full API docs available at http://localhost:8000/docs when running locally.


Roadmap

  • Core UI/UX & Backend Integration
  • Multi-user Authentication
  • Image Upload & PDF Export
  • Data Visualization & Statistics
  • WeChat Cloud Run Deployment
  • Issue Detail Page & Swipe Actions
  • OCR for Receipt Scanning
  • Maintenance Reminders (Push Notifications)
  • Social Sharing & Community Features

Contributing

Contributions are welcome! Please read CONTRIBUTING.md first.

git checkout -b feature/amazing-feature
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
# Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with love for car enthusiasts
Report Bug โ€ข Request Feature

About

Manage your vehicle maintenance like a Git repository. ๐Ÿš— A WeChat Mini Program for tracking car lifecycle with Git-style timelines.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors