Tattoo Logo

Tattoo

A modern reimplementation of TAT — the course helper app for Taipei Tech students

An NPC Project Made with Flutter Works on my machine Weblate Translation Progress

Help us translate! We use Weblate to manage localizations. Join the project and help us bring Tattoo to your language!

What is this?

Project Tattoo is a work-in-progress Flutter app that helps Taipei Tech (NTUT) students access their course schedules and academic information. This is a ground-up reimplementation with a focus on:

  • Modern, maintainable code — Clean architecture and best practices
  • Developer-friendly — Easy for future club members to understand and contribute
  • Concise implementation — No unnecessary complexity

Getting Started

This project uses mise to manage development tools (Flutter, Java, Ruby).

# Install and activate mise (if not already)
# See: https://mise.jdx.dev/getting-started.html

# Install Flutter, Java, and Ruby
mise install

# Install Flutter dependencies
flutter pub get

# (Optional) Install Ruby dependencies for fastlane
bundle install

# Run the app
flutter run

Firebase & Credentials

This project uses a private Git repository to manage sensitive credentials (signing keys, service accounts, and Firebase configuration files).

  1. Request Access: Contact the maintainers for access to the tattoo-credentials repository.
  2. Configure .env: Copy .env.example to .env and fill in the MATCH_GIT_URL and MATCH_PASSWORD.
  3. Fetch Configs: Run dart run tool/credentials.dart fetch. This will decrypt and place files like google-services.json and keystore.jks in their respective directories.

Firebase Setup (Maintainers only)

If you need to reconfigure Firebase:

  1. Install the Firebase CLI.
  2. Install the FlutterFire CLI.
  3. Run flutterfire configure to update lib/firebase_options.dart.
  4. Encrypt and push new config files using dart run tool/credentials.dart encrypt <file> <path_in_repo>.

HTML Snapshot Capture

Developers can capture raw NTUT HTML/XML responses for parser work:

# List supported Service-layer capture presets
dart run tool/html_snapshot.dart list

# Capture a known page using test/test_config.json
dart run tool/html_snapshot.dart capture student_query.profile -m "profile parser baseline"

# Capture multiple known pages
dart run tool/html_snapshot.dart capture student_query.profile course.semester_list -m "semester start samples"

# Capture every preset that can be resolved without explicit IDs
dart run tool/html_snapshot.dart capture -a -m "routine parser refresh"

# Capture a custom request with the same service client settings
dart run tool/html_snapshot.dart raw QryBasisData.jsp --service student_query -m "custom profile page check"

The tool reads test/test_config.json. If the file is missing, copy test/test_config.json.example to test/test_config.json and fill in NTUT_TEST_USERNAME and NTUT_TEST_PASSWORD.

Captured files are written under tmp/html_snapshot/ with the service name prefixed in the file name. Each file starts with a commented metadata block containing a raw-capture warning, preset, request_url, fetchtime, message, and a parser expected-result TODO; use -m/--message to describe why the sample was kept. If no message is provided, the tool writes a message: TODO placeholder that must be replaced before promotion. The parser expected-result TODO is separate from message and may remain until the HTML-based test code is complete. This directory is local-only and ignored by git. Do not commit raw captures; de-identify them before promoting any sample into a fixture or documentation, and do not submit a promoted snapshot without a meaningful message. capture -a skips presets that require explicit identifiers, such as a course, teacher, classroom, or syllabus ID.

When adding new Service-layer parser requests, add or update capture presets in tool/html_snapshot/presets.dart.

Portal Endpoints Scraper

Developers can scrape all available subsystem endpoints and their corresponding apOu SSO codes from the NTUT portal:

# Scrape and print as plain text table using test/test_config.json
dart run tool/scrape_portal.dart

# Scrape and print as formatted JSON
dart run tool/scrape_portal.dart -f json

# Scrape and write output directly to a JSON file
dart run tool/scrape_portal.dart -f json -o tmp/portal_endpoints.json

# Pass username via command line and password via environment variable
NTUT_PORTAL_PASSWORD=<password> dart run tool/scrape_portal.dart -u <username>

The scraper logs in to the NTUT portal using the mobile App User-Agent flow to bypass the web login captcha, fetches the portal tree page (aptreeMain.do), extracts the SSO targets, and deduplicates the results automatically.

Command Options & Usage

Run the tool using Dart:

dart run tool/scrape_portal.dart [arguments]

Available Arguments:

  • -u, --username: NTUT portal username (can also be set via NTUT_PORTAL_USERNAME or NTUT_TEST_USERNAME environment variables).
  • -c, --config: Path to config JSON (defaults to test/test_config.json if credentials aren't passed via CLI or env variables).
  • -f, --format: Output format, either text (default) or json.
  • -o, --output: Path to write the output content. Prints to standard output if omitted.
  • -h, --help: Displays help info.

Password must be supplied either via the config file or via the NTUT_PORTAL_PASSWORD / NTUT_TEST_PASSWORD environment variables to prevent command history leaks.

Local Development

Android SDK: Install Android Studio or let Flutter download SDK components automatically on first build.

VS Code users: See .vscode/README.md for project-specific setup instructions.

Contributors: See CONTRIBUTING.md for commit and branch guidelines.

Project Context

Check AGENTS.md to see detailed architecture notes, implementation status, and future plans.

This project exists alongside two other implementations:

Project Tattoo aims to take lessons learned from both and create a clean, maintainable foundation for future development.

License

Copyright (C) 2026 NTUT Programming Club (NTUT-NPC)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

See LICENSE for details.

Libraries

components/anchored_popup_menu
components/app_skeleton
components/chip_tab_switcher
components/floating_action_bar
components/notices
components/option_entry_tile
components/section_header
components/widget_preview_frame
database/actions
database/database
database/schema
Database schema definitions for Tattoo.
database/views
firebase_options
i18n/strings.g
Generated file. Do not edit.
i18n/strings_en_US.g
Generated file. Do not edit.
main
models/classroom
models/contributor
models/course
models/login_exception
models/ranking
models/score
models/user
repositories/auth_repository
repositories/calendar_repository
repositories/course_repository
repositories/portal_repository
repositories/preferences_repository
repositories/student_repository
router/app_router
screens/main/calendar/calendar_providers
screens/main/calendar/calendar_screen
screens/main/course_table/course_table_cell
screens/main/course_table/course_table_detail_sheet
screens/main/course_table/course_table_grid
screens/main/course_table/course_table_providers
screens/main/course_table/course_table_screen
screens/main/home/home_screen
screens/main/home_screen
screens/main/kiosk_login/kiosk_login_qr_screen
screens/main/portal/portal_screen
screens/main/profile/about_screen
screens/main/profile/preference_providers
screens/main/profile/profile_card
screens/main/profile/profile_danger_zone
screens/main/profile/profile_providers
screens/main/profile/profile_screen
screens/main/profile/regedit_screen
screens/main/scanner/scanner_guide_bottom_sheet
screens/main/scanner/scanner_screen
screens/main/score/score_providers
screens/main/score/score_screen
screens/main/score/score_view_helpers
screens/main/user_providers
screens/welcome/intro_screen
screens/welcome/login_screen
services/course/course_service
services/course/mock_course_service
services/course/ntut_course_service
services/demo_mode
services/firebase_service
services/github_service
services/i_school_plus/i_school_plus_service
services/i_school_plus/mock_i_school_plus_service
services/i_school_plus/ntut_i_school_plus_service
services/portal/mock_portal_service
services/portal/ntut_portal_service
services/portal/portal_service
services/student_query/mock_student_query_service
services/student_query/ntut_student_query_service
services/student_query/student_query_service
shells/animated_shell_container
shells/showcase_shell
utils/auto_spacing
utils/avatar_payload
utils/http
utils/launch_url
utils/localized
utils/network_error
utils/network_error_io
utils/network_error_stub
utils/pref_type
utils/shared_preferences