A full-stack kindergarten management application demonstrating modern mobile development practices, role-based access control, real-time data synchronization, and comprehensive parent-staff communication features.
Course: Mobile Application Development | Date: December 2025
- Node.js 16+ and npm
- Expo Go app on your mobile device (iOS/Android)
- Git
-
Clone the repository
git clone https://github.com/yourusername/Barnehage_app.git cd Barnehage_app -
Install backend dependencies and start server
npm install npm run dev
Backend will run on
http://localhost:3002 -
Install frontend dependencies and start app (in new terminal)
cd my-app npm install npx expo start -
Run the app
- Scan QR code with Expo Go app (iOS Camera or Android Expo Go)
- Or press
ifor iOS simulator,afor Android emulator
-
Login credentials
- Admin: Username:
Admin/ Password:Admin - Guest (Parent): Username:
Gjest/ Password:Gjest
- Admin: Username:
Technology Stack: React Native + Expo SDK 52
- Framework: Expo Router for file-based navigation
- UI Components: Custom theme system with consistent design tokens
- State Management: React Context API for authentication and user state
- Styling: StyleSheet with centralized theme constants (Colors, Typography, Spacing)
- Navigation: Tab-based navigation with role-specific routes
Key Features:
- Role-based UI rendering (Admin vs Guest/Parent views)
- Real-time check-in/check-out tracking
- Activity feed with parent-staff communication
- Private messaging system
- Child information management
- Parent identity verification workflow
Technology Stack: Node.js + Express
- Server: Express 5.1.0 with CORS enabled
- API Design: RESTful endpoints with JSON responses
- Middleware: Body-parser for JSON parsing, CORS for cross-origin requests
- Data Validation: Input sanitization and GDPR-compliant data handling
API Endpoints:
/api/children- Child management (CRUD operations)/api/parents- Parent management and verification/api/activities- Activity feed posts/api/messages- Parent-staff messaging/api/stats- Real-time statistics and overview
Current: JSON file-based storage (database.json)
- Lightweight and simple for development
- Synchronous read/write operations
- Direct object manipulation
- Easy to inspect and debug
Data Models:
- Children: id, name, age, group, status, timestamps
- Parents: id, name, email, phone, verified, childrenIds
- Activities: id, title, description, group, createdAt
- Messages: id, parentId, content, sender, timestamp, read
Why MongoDB?
- Native JSON/BSON format aligns with current data structure
- Horizontal scalability for growing user base
- Flexible schema for evolving data models
- Rich querying capabilities with aggregation pipeline
- Built-in data validation and indexing
Migration Plan:
- Set up MongoDB Atlas cluster or local MongoDB instance
- Create Mongoose schemas matching current data models
- Implement data migration scripts from JSON to MongoDB
- Update API endpoints to use MongoDB queries
- Add proper error handling and validation
- Implement connection pooling and retry logic
- Push notifications for check-in/out events
- Photo uploads for activities
- Calendar integration for events
- Multi-language support (Norwegian/English)
- Offline-first architecture with sync
- Docker containerization
- CI/CD pipeline with GitHub Actions
- Cloud deployment (AWS/Azure/GCP)
- Automated testing (Jest, React Native Testing Library)
- Performance monitoring and analytics
- Role-based access control (RBAC)
- Input sanitization against XSS and injection attacks
- GDPR-compliant data handling
- Secure password storage (planned: bcrypt hashing)
- TypeScript for type safety
- Consistent code formatting
- Component-based architecture
- Separation of concerns (API service layer)
- Console logging for debugging
- Error boundary implementation (planned)
- Performance metrics tracking (planned)
Barnehage_app/
├── server.js # Express backend server
├── database.json # JSON file database
├── routes/ # API route handlers
├── models/ # Data models and schemas
├── my-app/ # React Native frontend
│ ├── app/ # Expo Router pages
│ │ ├── (tabs)/ # Tab-based screens
│ │ ├── login.tsx # Login screen
│ │ └── _layout.tsx # Root layout and auth
│ ├── components/ # Reusable components
│ ├── contexts/ # React contexts (Auth)
│ ├── services/ # API service layer
│ └── constants/ # Theme and config
└── README.md
Backend:
npm start # Start production server
npm run dev # Start with nodemon (auto-reload)Frontend:
npx expo start # Start Expo dev server
npx expo start -c # Start with cleared cache- Create API endpoint in backend (
routes/orserver.js) - Add service method in
my-app/services/api.ts - Create or update screen in
my-app/app/(tabs)/ - Update navigation in
_layout.tsxif needed - Test with both Admin and Guest roles
Note: This application uses mock authentication for demonstration purposes. In production, implement proper authentication with JWT tokens, encrypted passwords, and secure session management.