This repository contains the code for the tutorial: Creating a Supabase Project with React and TypeScript by Mobisoft - App Development Company, Houston.
To run the project locally:
- Clone the repository:
git clone https://github.com/mobisoftinfotech/supabase-react-tutorial.git
- Navigate to the project directory:
cd supabase-react-tutorial
- Install the dependencies:
npm install
- Update supabaseUrl and supabaseAnonKey in src/supabaseClient.ts file, Grab the key and URL from your Supabase dashboard under Settings > Data API:
const supabaseUrl = 'https://your-project.supabase.co'
const supabaseAnonKey = 'your-anon-key'
- Start the development server:
npm run dev
- Open your browser and navigate to http://localhost:5173 to view the application.
-
Authentication System
- Complete user authentication flow
- Session management
- Protected routes
-
Social Media Features
- Posts management
- Followers system
- Real-time updates
-
Modern Tech Stack
- React with TypeScript
- Vite as build tool
- Supabase for backend
- React Router for navigation
src/Auth.tsx
- Authentication componentsrc/Posts.tsx
- Posts managementsrc/Followers.tsx
- Followers systemsrc/supabaseClient.ts
- Supabase client configurationsrc/App.css
- Styling
You can find the integrated demo components in the following files:
App.tsx
- Main application component with routingPosts.tsx
- Posts management interfaceFollowers.tsx
- Followers management interfaceAuth.tsx
- Authentication interface
The application implements a complete authentication flow with protected routes and real-time data synchronization using Supabase.