Learn the system architecture for building an event management mobile app with React Native Expo. Understand the tech stack, data flow, and folder structure.
š About This Project
The Lampung Dev mobile application is an event management and attendance system used by admins to:
- ā
View available events
- ā
View event details and participants
- ā
Scan QR codes for attendance verification
- ā
Record participant check-in times
This app is built to support developer community activities like meetups, workshops, and conferences.
šÆ Who Should Follow This Series?
This series is suitable for:
- Beginners who want to learn React Native
- Web developers looking to expand into mobile development
- Developers interested in the Expo ecosystem
- Anyone interested in event management systems
šļø System Architecture
Architecture Overview
The system follows a client-server architecture with multiple clients connecting to a single REST API backend.
| Layer | Description |
|---|
| Clients | Web Client, Mobile Client, Admin Panel |
| Backend | REST API built with Next.js |
| Database | PostgreSQL for data persistence |
System Components
| Component | Technology | Features |
|---|
| š Web Client | Next.js | Landing page, Event list, Registration |
| š± Mobile Client | React Native + Expo | QR Scanner, Event list, Attendance (Focus of this series!) |
| āļø Admin Panel | Next.js | Event CRUD, Member CRUD, Reports |
| š REST API | Next.js API Routes | /api/admin/auth, /api/admin/events, /api/attendance |
| šļø Database | PostgreSQL | users, events, attendances, registrations |
Data Flow
| From | To | Description |
|---|
| Clients (Web, Mobile, Admin) | REST API | HTTP requests for data |
| REST API | PostgreSQL | Data persistence |
| PostgreSQL | REST API | Query results |
| REST API | Clients | JSON responses |
š± Mobile App Architecture
The mobile app follows a layered architecture pattern for clean separation of concerns.
App Layers
| Layer | Folder | Description |
|---|
| š± Presentation | app/ | UI screens and navigation |
| šļø State | store/ | Zustand state management |
| š Services | services/ | API communication layer |
| āļø External | - | Backend REST API |
Presentation Layer (Screens)
| Screen | Path | Description |
|---|
| Home | app/(tabs)/index.tsx | Event list with pull-to-refresh |
| Scanner | app/(tabs)/scanner.tsx | QR code scanner for attendance |
| Account | app/(tabs)/account.tsx | User profile and logout |
| Event Detail | app/event/[id].tsx | Event info and participants |
| Login | app/login.tsx | Admin authentication |
State Layer (Zustand Store)
| Store | Functions | Description |
|---|
auth.ts | token, user, setAuth(), logout(), initialize() | Authentication state management |
Service Layer (API Calls)
| Service | Functions | API Endpoint |
|---|
api.ts | Axios instance | Base configuration + interceptors |
auth.ts | loginAdmin() | POST /api/admin/auth |
events.ts | getAdminEvents(), getEventDetail() | GET /api/admin/events |
attendance.ts | recordAttendance() | POST /api/attendance |
š Data Flow Diagrams
Authentication Flow
| Step | Action | Description |
|---|
| 1ļøā£ | User enters credentials | Email and password on Login screen |
| 2ļøā£ | Call loginAdmin() | Service sends POST to /api/admin/auth |
| 3ļøā£ | API validates | Server checks credentials in database |
| 4ļøā£ | Receive token | API returns { token, user } |
| 5ļøā£ | Store auth | Zustand saves to SecureStore (encrypted) |
| 6ļøā£ | Navigate to Home | User redirected to tab navigator |
QR Attendance Flow
| Step | Action | Description |
|---|
| 1ļøā£ | Admin scans QR | Camera reads QR code from participant |
| 2ļøā£ | Decode data | Parse format: eventId:uniqueCode |
| 3ļøā£ | Call API | Send POST to /api/attendance |
| 4ļøā£ | Validate registration | Server checks if participant is registered |
| 5ļøā£ | Record check-in | Database saves attendance timestamp |
| 6ļøā£ | Show result | Display success/error animation |
š ļø Tech Stack
| Technology | Purpose | Why? |
|---|
| React Native | Mobile framework | Cross-platform (iOS + Android) |
| Expo | Development platform | Fast setup, no native code required |
| Expo Router | Navigation | File-based routing like Next.js |
| NativeWind | Styling | Tailwind CSS syntax (familiar) |
| Zustand | State management | Simple, lightweight, no boilerplate |
| Axios | HTTP client | Interceptors for auth headers |
| SecureStore | Token storage | Encrypted storage (secure) |
| Expo Camera | QR scanning | Native camera access |
š Folder Structure
| Folder | Files | Description |
|---|
| app/ | - | Screens (Expo Router) |
| app/(tabs)/ | index.tsx, scanner.tsx, account.tsx | Tab navigation screens |
| app/event/ | [id].tsx | Event Detail (dynamic route) |
| app/ | login.tsx, _layout.tsx, +not-found.tsx | Login, Root Layout, 404 |
| components/ | EventCard.tsx, LoadingSpinner.tsx | Reusable UI components |
| services/ | api.ts, auth.ts, events.ts, attendance.ts | API communication layer |
| store/ | auth.ts | Zustand state management |
| constants/ | Colors.ts | App constants |
| utils/ | theme.ts | Utility functions |
| assets/ | fonts/, images/ | Static assets |
š Security
| Security Layer | Implementation | Description |
|---|
| Token Storage | expo-secure-store | Encrypted keychain/keystore |
| API Communication | HTTPS only | TLS encryption in transit |
| Authentication | JWT tokens | Short-lived, server-validated |
| Authorization | Role-based | Admin-only endpoints |
š
Learning Path
| Week | Parts | Topics |
|---|
| Week 1 | Part 1-3 | Architecture, Installation, Project Setup |
| Week 2 | Part 4-5 | Authentication, Event Management |
| Week 3 | Part 6-7 | QR Scanner, Polish & Deploy |
ā
Checklist Before Moving On
Before proceeding to Part 2, make sure you:
š Next Steps
In Part 2, we'll set up the development environment on Mac, Windows, or Ubuntu including Node.js, VS Code, Expo CLI, and Android Studio/Xcode.
Next: Installation on Mac, Windows, Ubuntu ā
This series is created to support the Casual Meetup #15 at LampungDev.