Inspiration

As students ourselves, we noticed how difficult it is to stay focused during class with constant notifications from social media apps. We also saw teachers struggling with manual attendance tracking and students missing important class time. We wanted to create a solution that not only streamlines attendance but also helps students maintain focus by temporarily blocking distracting apps during class - making learning more engaging and productive.

What it does

TAPN (Tap-in) is an iOS classroom management app that combines NFC-based attendance tracking with automatic app blocking: For Students:

  • Tap their phone on an NFC tag to check into class
  • Distracting apps (Instagram, TikTok, games) are automatically blocked for the class duration
  • Can tap out early if needed, which removes the app restrictions
  • View their class schedule and attendance status in real-time

For Teachers:

  • Create and manage class sessions with customizable time limits
  • Add students to class rosters by email
  • Write class information to NFC tags that students can scan
  • Monitor real-time attendance showing who's present or absent
  • Control which apps are blocked and which are allowed (e.g., Notes, Canvas, Google Classroom)

The app uses iOS Screen Time API to enforce restrictions, ensuring students stay focused on learning during class time.

How we built it

Tech Stack:

  • Frontend: SwiftUI for native iOS interface
  • Backend: Supabase (PostgreSQL database with real-time capabilities)
  • NFC: CoreNFC framework for reading/writing NFC tags
  • App Blocking: iOS Family Controls framework (Screen Time API)
  • Authentication: Google Sign-In integration with Supabase Auth
  • Version Control: Git/GitHub for team collaboration

Architecture:

  • Client-server architecture with RESTful API calls to Supabase
  • Row Level Security (RLS) policies to ensure teachers only see their classes and students only see classes they're rostered in
  • Real-time polling for live attendance updates
  • Persistent app blocking that survives app restarts

Development Process:

  • Built in separate feature branches (NFC functionality, Supabase integration, UI)
  • Merged features incrementally with thorough testing
  • Used physical iPhones for NFC testing (simulator doesn't support NFC hardware)

Challenges we ran into

  1. Supabase Row Level Security (RLS) Policies: We ran into multiple issues where data wasn't loading due to overly restrictive RLS policies. For example, students couldn't see their classes because our policy only allowed teachers to view class data. We had to carefully design policies that balance security with functionality.
    1. Authentication Timing Issues: The app would load before authentication completed, causing bootstrap data to fail. We solved this by re-loading class data after successful sign-in events.
    2. Roster Data Persistence: When teachers started class sessions or updated settings, the roster would disappear because we weren't including roster data in our SELECT queries. We had to ensure all 5 API methods (setDuration, setCategories, setAllowedApps, startClass, endClass) returned complete data including the roster.
    3. NFC Hardware Requirements: NFC functionality only works on physical iPhones (iPhone 7+), not the simulator. This made testing more difficult and required us to implement simulation modes for development.
    4. Git Branch Merging: Working with multiple team members on different features led to complex merge conflicts, especially in the Xcode project file. We learned to communicate about which files we were editing and to test thoroughly after merges.
    5. Screen Time API Limitations: The Family Controls framework requires special entitlements and has strict privacy controls. We had to carefully design the blocking system to work within iOS restrictions.

Accomplishments that we're proud of

  1. Seamless NFC Integration: Students can tap in with a single phone tap - no typing, no manual selection. Teachers can write class data to physical NFC tags placed in their classrooms.
  2. Real-time Attendance Tracking: Teachers see live updates as students tap in, with a clean UI showing present/absent status for all rostered students.
  3. Smart App Blocking: The app intelligently blocks distracting apps while allowing educational tools. Blocks automatically expire when class ends or students tap out.
  4. Robust Backend Architecture: Despite initial RLS challenges, we built a secure, scalable backend that properly separates teacher and student data while enabling real-time collaboration.
  5. Smooth Cross-Feature Integration: Successfully merged NFC functionality, Supabase backend, Google authentication, and Screen Time blocking into a cohesive app - a significant engineering achievement given the complexity of each system.
  6. User-Centric Design: The app works differently for teachers vs students, with role-based views and permissions that make sense for each user type.

What we learned

Technical Skills:

  • How to implement iOS Screen Time restrictions using Family Controls framework
  • Working with NFC hardware (reading NDEF messages, writing to tags)
  • Designing and implementing Row Level Security policies in PostgreSQL/Supabase
  • Building real-time collaborative features with polling and state management
  • Handling asynchronous authentication flows and state persistence
  • Managing complex state in SwiftUI with @Published properties and Combine

Development Practices:

  • The importance of testing before committing (we learned this the hard way!)
  • How to resolve git merge conflicts in Xcode project files
  • Breaking large features into smaller, testable increments
  • Debugging with print statements and console logging to track data flow
  • The value of thorough planning before implementation

Problem-Solving:

  • How to debug invisible issues (like data not loading due to RLS policies)
  • Thinking through edge cases (what happens if a student isn't on the roster?)
  • Balancing feature completeness with deadline constraints

What's next for TAPN

Short-term:

  1. Automatic Tap-Out System: When a teacher ends class or time expires, automatically tap out all students and remove app blocks remotely
  2. NFC-Driven Class Selection: Students select which class to tap into based on the UUID stored in the NFC tag, removing the need for manual selection
  3. Enhanced Analytics: Show teachers attendance trends, late arrivals, and engagement metrics over time
  4. Push Notifications: Alert students when class is starting or ending

Long-term:

  1. Multi-Platform Support: Expand to Android devices using React Native or Flutter
  2. School-Wide Dashboard: Admin view for principals to monitor attendance across all classes
  3. Parent Portal: Let parents see their child's attendance and engagement
  4. Integration with LMS: Sync with Canvas, Google Classroom, or other learning management systems
  5. Behavior Insights: Use app blocking data to identify which distractions are most common and help students develop better digital habits
  6. Geofencing: Automatically detect when students are in/near the classroom to trigger app blocks without NFC

Scalability:

  • Deploy to TestFlight for beta testing with real classrooms
  • Gather teacher and student feedback to refine UX
  • Explore partnerships with schools interested in piloting the technology

Built With

Share this project:

Updates