A React Native application with a simple message board functionality that allows users to register, log in, and post messages. Built with Expo and Supabase, the app integrates user authentication, real-time updates, and a dynamic UI.
- Registration screen with email, password, and user profile fields (e.g., avatar, first name, last name)
- Login screen with email and password
- Displays a list of posts with:
- Post content
- Author's name and avatar
- Post creation date (formatted)
- Real-time updates when new posts are created or deleted
- Allows logged-in users to create new posts
- KeyboardAvoidingView ensures inputs are accessible when the keyboard is active
- Loading skeletons while fetching data
- Error handling with user-friendly messages
- Consistent design using Gluestack UI components
- Authentication state is managed via Supabase
- Post list dynamically updates based on real-time changes
POST /register: Create a new user (handled by Supabase)POST /login: Authenticate users and manage sessions (handled by Supabase)GET /posts: Fetch all posts with user details (handled by Supabase)POST /posts: Create a new post (authentication required)
- Supabase is used as the backend-as-a-service
- Tables:
- users: Stores user profiles (e.g., name, avatar)
- posts: Stores posts with references to user IDs
- Supabase handles JWT-based authentication securely
- Node.js (>= 18 recommended)
- Expo CLI installed globally (
npm install -g expo-cli)
-
Clone the repository:
git clone https://github.com/PrinceCarter/MessageBoard.git cd MessageBoard -
Install dependencies:
npm install
-
Start the Expo app:
npx expo start
-
Scan the QR code with the Expo Go app or launch the app in an iOS/Android simulator.
- Focus on Core Features: Time constraints limited advanced functionality such as pagination and post editing.
- Security: Supabase handles authentication and sensitive data securely, reducing the need for custom implementation.
- Styling: Used Gluestack UI and NativeWind for a polished yet efficient UI.
- Users register and log in through the Supabase-authenticated backend.
- The message board dynamically fetches posts and integrates real-time updates using Supabase's subscription model.
- Posts include enriched user details (name, avatar) fetched from the
userstable.
- Frontend: React Native, Expo, Gluestack UI, NativeWind
- Backend: Supabase
- Real-time Updates: Supabase's
realtimechannel - State Management: React useState, useEffect
- Styling: Gluestack UI, Tailwind CSS
- Error States: Improved UI for handling backend errors gracefully.
- Advanced Features:
- Post editing and deletion by users
- Web Compatibility: The current setup does not support web environments due to the usage of
AsyncStorageand React Native-specific configurations. This can be addressed in the future by implementing platform-specific solutions or using a unified storage strategy.