Skip to content

Repository files navigation

TangoBar Manager

A local-first Tango School management application built with Tauri v2, React, and SQLite.

Tech Stack

  • Core: Tauri v2 with tauri-plugin-sql for SQLite
  • Frontend: React + TypeScript + Tailwind CSS
  • State Management: TanStack Query (React Query)
  • Architecture: Clean Architecture with Repository Pattern

Project Structure

src/
├── domain/          # Entities and types
├── repositories/    # Repository interfaces
├── infrastructure/  # SQLite implementations
├── services/        # Business logic layer
└── hooks/           # React Query hooks

Database Schema

The app uses SQLite with the following tables:

  • students: Student profiles with role and Millesimi rating (0-1000)
  • courses: Course schedules
  • subscriptions: Student subscription management

Migrations are located in src-tauri/migrations/.

Development

Prerequisites

  • Node.js 20+
  • Rust (latest stable)
  • npm or pnpm

Install Dependencies

npm install

Run Development Server

npm run tauri dev

This will:

  1. Start the Vite dev server (React frontend)
  2. Build and run the Tauri app
  3. Initialize the SQLite database with migrations

Build for Production

npm run tauri build

Architecture Notes

Clean Architecture Pattern

The app follows a layered architecture:

  1. Domain Layer (src/domain/): Pure TypeScript types, no dependencies
  2. Repository Layer (src/repositories/): Interfaces defining data contracts
  3. Infrastructure Layer (src/infrastructure/): SQLite implementations
  4. Service Layer (src/services/): Business logic (e.g., promoteStudent)
  5. Presentation Layer (src/hooks/, src/App.tsx): React components and hooks

Dependency Injection

Services receive repository implementations via constructor injection:

const repository = new SQLiteStudentRepository();
const service = new StudentService(repository);

This makes the code testable and allows swapping implementations (e.g., mock for testing).

Features

  • ✅ Student management with role tracking (Leader/Follower/Both)
  • ✅ Millesimi rating system (0-1000)
  • ✅ Student promotion logic (increments rating by 10, caps at 1000)
  • 🚧 Course management (schema ready, implementation pending)
  • 🚧 Subscription tracking (schema ready, implementation pending)

Mobile Support

This application can be run on mobile devices in two ways:

  1. Via Browser (LAN): See README-MOBILE.md.
  2. Native App (Android/iOS): See README-NATIVE-MOBILE.md.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages