A modern social media platform built with React, TypeScript, and Supabase π
Features β’ Tech Stack β’ Getting Started β’ Project Structure β’ Environment Variables β’ License
- User Authentication π - Secure sign up/sign in with email and password
- Posts π - Create, view, like, and comment on posts
- Stories πΈ - Share temporary content that expires after 24 hours
- Comments π¬ - Interactive comment system on posts
- Connections π€ - Send and manage connection requests
- Follow System π₯ - Follow other users to see their content
- Messages π - Real-time private messaging between users
- Notifications π - Stay updated with notifications for various activities
- User Profiles π€ - Customizable profiles with bio, avatar, and cover image
- Discover/Explore π - Discover new content and users
- Dark/Light Theme π - System-wide theme switching
- Image Upload πΌοΈ - Upload images for posts and profiles
- Video Upload π₯ - Upload videos for stories and posts
- Post Insights π - View engagement metrics on your posts
- Suggested Users π― - Get recommendations for users to follow
- Online Status π’ - See when users are online or last active
- Real-time Updates β‘ - Live updates for likes, comments, and posts
- Account Deletion ποΈ - Delete your account and data permanently
- Privacy Policy π - Comprehensive privacy policy page
- Terms of Service π - Terms and conditions page
- React 18 βοΈ - UI library
- TypeScript π - Type-safe JavaScript
- Vite β‘ - Build tool and dev server
- Tailwind CSS π¨ - Utility-first CSS framework
- Shadcn/UI π - Component library
- React Router π€οΈ - Client-side routing
- Supabase Client βοΈ - Backend integration
- PostgreSQL π - Relational database
- Authentication π - User management
- Storage π¦ - File storage for images/videos
- Realtime π‘ - Real-time subscriptions
- Edge Functions β‘ - Serverless functions
- ESLint π - Code linting
- Vitest π§ͺ - Testing framework
- Bun π° - JavaScript runtime and package manager
- Node.js 18+ π’
- Bun π° (recommended) or npm/yarn π¦
- Supabase Account βοΈ - Create one here
-
Clone the repository π
git clone <repository-url> cd Connecto
-
Install dependencies π₯
# Using bun (recommended) bun install # Or using npm npm install
-
Set up Supabase π§
a. Create a new Supabase project at supabase.com
b. Run the migrations in
supabase/migrations/:20260213165028_e62793d5-3a85-4007-aaf2-1c00786516a8.sql20260215164637_f1fe321b-40be-4525-995f-f720d815633a.sql20260216181409_f2603ac3-5bd1-41d5-93e8-3f79b2947bdb.sql20260221100451_7332021c-64d6-475d-a30e-ae91ea2b38a3.sql20260301132000_add_last_seen_at.sql20260301134000_enable_realtime.sql20260311201500_make_username_required.sql
c. Configure storage bucket for media uploads
d. Set up authentication settings
-
Configure Environment Variables βοΈ
Create a
.envfile in the root directory:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Start the development server π
# Using bun bun dev # Or using npm npm run dev
-
Open your browser π Navigate to
http://localhost:5173
Connecto/
βββ public/ # Static assets
β βββ favicon.ico # Site favicon
β βββ placeholder.svg # Placeholder images
β βββ robots.txt # SEO robots file
βββ src/
β βββ assets/ # Application assets
β β βββ connecto-icon.png
β β βββ connecto-logo.png
β β βββ login.avif
β βββ components/ # React components
β β βββ auth/ # Authentication components
β β β βββ ProtectedRoute.tsx
β β βββ layout/ # Layout components
β β β βββ EmailVerificationBanner.tsx
β β β βββ Layout.tsx
β β β βββ MobileNav.tsx
β β β βββ Sidebar.tsx
β β βββ posts/ # Post-related components
β β β βββ CommentsSection.tsx
β β β βββ PostCard.tsx
β β β βββ PostComposer.tsx
β β β βββ PostInsights.tsx
β β βββ stories/ # Story components
β β β βββ Stories.tsx
β β β βββ StoryViewer.tsx
β β βββ ui/ # UI components (Shad β β cn)
β βββ button.tsx
β β β βββ card.tsx
β β β βββ dialog.tsx
β β β βββ input.tsx
β β β βββ OnlineIndicator.tsx # Online status indicator
β β β βββ ... (many more)
β β βββ users/ # User-related components
β β βββ SuggestedUsers.tsx
β βββ contexts/ # React contexts
β β βββ AuthContext.tsx # Authentication context
β β βββ ThemeContext.tsx # Theme context
β βββ hooks/ # Custom React hooks
β β βββ useComments.ts
β β βββ useConnections.ts
β β βββ useFollows.ts
β β βββ useMessages.ts
β β βββ useNotifications.ts
β β βββ usePosts.ts
β β βββ useProfile.ts
β β βββ useStories.ts
β β βββ useSuggestedUsers.ts
β β βββ useUpdateLastSeen.ts # Auto-update last_seen timestamp
β βββ integrations/ # External integrations
β β βββ supabase/
β β βββ client.ts # Supabase client setup
β β βββ types.ts # TypeScript types
β βββ lib/ # Utility libraries
β β βββ utils.ts # Helper functions
β βββ pages/ # Page components
β β βββ Auth.tsx # Authentication page
β β βββ Chat.tsx # Chat page
β β βββ Connections.tsx # Connections page
β β βββ Create.tsx # Create post/story page
β β βββ Discover.tsx # Discover page
β β βββ Explore.tsx # Explore page
β β βββ Index.tsx # Home/Feed page
β β βββ Messages.tsx # Messages page
β β βββ Notifications.tsx# Notifications page
β β βββ Profile.tsx # User profile page
β β βββ Settings.tsx # Settings page
β β βββ UserProfile.tsx # Other user profile
β β βββ NotFound.tsx # 404 page
β βββ test/ # Test files
β βββ App.css # App styles
β βββ App.tsx # Main App component
β βββ index.css # Global styles
β βββ main.tsx # Entry point
βββ supabase/ # Supabase configuration
β βββ config.toml # Supabase config
β βββ functions/ # Edge functions
β β βββ delete-account/
β β β βββ index.ts # Delete account function
β β βββ signup/
β β βββ index.ts # Custom signup function
β βββ migrations/ # Database migrations
β βββ 20260213165028_e62793d5-3a85-4007-aaf2-1c00786516a8.sql
β βββ 20260215164637_f1fe321b-40be-4525-995f-f720d815633a.sql
β βββ 20260216181409_f2603ac3-5bd1-41d5-93e8-3f79b2947bdb.sql
β βββ 20260221100451_7332021c-64d6-475d-a30e-ae91ea2b38a3.sql
β βββ 20260301132000_add_last_seen_at.sql
β βββ 20260301134000_enable_realtime.sql
β βββ 20260311201500_make_username_required.sql
βββ components.json # Shadcn components config
βββ eslint.config.js # ESLint configuration
βββ index.html # HTML entry point
βββ package.json # Dependencies
βββ postcss.config.js # PostCSS config
βββ tailwind.config.ts # Tailwind config
βββ tsconfig.json # TypeScript config
βββ tsconfig.app.json # TypeScript app config
βββ tsconfig.node.json # TypeScript node config
βββ vite.config.ts # Vite config
βββ vitest.config.ts # Vitest config
βββ .env # Environment variables (not committed)
| Variable | Description | Required |
|---|---|---|
VITE_SUPABASE_URL |
Your Supabase project URL | Yes |
VITE_SUPABASE_ANON_KEY |
Your Supabase anon key | Yes |
- Go to Supabase Dashboard
- Select your project
- Go to Settings β API
- Copy the Project URL and anon public key
# Development
bun dev # Start development server
bun build # Build for production
bun preview # Preview production build
# Testing
bun test # Run tests
bun test:watch # Run tests in watch mode
# Linting
bun lint # Run ESLint
# Type checking
bun typecheck # Run TypeScript type checkingThe application uses the following main tables:
- users π€ - User profiles and information
- profiles π€ - Extended profile information with last_seen_at
- posts π - User posts with text, images, videos
- comments π¬ - Comments on posts
- likes β€οΈ - Post likes (real-time enabled)
- stories β° - Temporary stories (24h expiry)
- follows π₯ - Follow relationships
- connections π€ - Connection requests and status
- messages βοΈ - Private messages
- notifications π - User notifications
- saved_posts π - Saved posts (real-time enabled)
- story_views ποΈ - Story view tracking
Contributions are welcome! Please read our Contributing Guidelines before submitting pull requests.
Please read our Code of Conduct to keep our community approachable and respectable.
For security vulnerabilities, please read our Security Policy.
This project is licensed under the MIT License - see the LICENSE file for details.
- Shadcn for the UI components
- Supabase for the backend infrastructure
- Tailwind CSS for styling
- React community
Made with β€οΈ by Connecto Team


