Side project

Attendance Management Service

Classes, attendance, and tuition for music studios share one API across web, iOS, and Android. Free home screens carry a banner, with an ad-free plan for academies.

Period
2025.01 — 2025.08
Role
Plan · Design · Build · Ship · Improve · solo
Stack
Next.js, SwiftUI, Compose, Prisma, attendance and tuition

Process

  1. Plan

    Classes, attendance, and tuition for music studios in one place.

  2. Design

    Academy-level multi-tenancy; attendance as a schedule status.

  3. Build

    Next.js web plus SwiftUI and Compose apps on one JSON API.

  4. Ship

    Web merges deploy automatically; mobile apps ship as signed release builds after internal testing.

  5. Improve

    Moved from a WebView shell to native clients.

System diagram 7 components · 6 connections Play the flow and trace each connection

Overview

A multi-tenant service for classes, schedules, attendance, and tuition. Attendance is a class-schedule status, not a separate table. Marking it decrements remaining sessions. The web app is the admin surface. iOS and Android call the same JSON API.

Why I built it

The goal was to put tenant boundaries and roles on a Prisma schema, and to keep a long time-based domain—dates, schedules, attendance—on the same model in the API and the UI.

The first client wrapped the site in a WebView. SwiftUI and Compose now hit the same API with a cookie session. Roles in use are admin and teacher.

System

Web: Next.js App Router, Prisma, MySQL, NextAuth v4. Pages and /api live in one app.

iOS: SwiftUI. Android: Jetpack Compose. After NextAuth credentials login they keep the cookie and call JSON. Push is APNs and FCM.

Mail and SMS go through AWS SES and NCloud SENS. The database is reached with a client certificate.

See this in the system diagram

Architecture and data

Accounts belong to an academy as admin, deputy, or teacher. Classes and teachers group sessions. Attendance is the status of that session: scheduled, attended, absent, postponed, or makeup. Remaining-session changes leave a history.

Tuition and academy subscriptions share the schema. Attendance alerts and dormant-academy notices are HTTP jobs that call the API.

Screens

Web: onboarding, academy pick, admin dashboard, classes, students, teachers, attendance, tuition, alerts, settings. Teachers see today’s schedule, pending attendance, assigned students, and class notes.

The apps draw the same range natively. System-admin screens stay on the web.

Stack

Web: Next.js 16, React 19, Prisma 6, MySQL, NextAuth 4, Mantine 8, Recharts, ExcelJS, PortOne.

Apps: SwiftUI, Jetpack Compose, cookie session, APNs, FCM.

Notes

Hard parts: academy, role, and code-master checks multiplied the branches. Makeup classes, holidays, and postponements had to use the same rules in the API and in monthly totals. Moving from a WebView session to native cookie login took a long stretch.

What held: Academy and UserAcademy are fixed in the schema, so later screens reuse the same authorization. Attendance as schedule status keeps session decrements and reports on one path. Web and apps share one JSON contract.