Skip to content

Latest commit

ย 

History

History
385 lines (278 loc) ยท 10 KB

File metadata and controls

385 lines (278 loc) ยท 10 KB

๐Ÿ”ท HashTribe

A developer-first community and collaboration platform

License: MIT TypeScript React Supabase Vite Tailwind CSS

Features โ€ข Tech Stack โ€ข Getting Started โ€ข Contributing โ€ข Roadmap


๐Ÿ“ธ Screenshots

image image

HashTribe Dashboard - Your developer community hub


๐ŸŽฏ About

HashTribe (DevCom) is a verified developer credibility & collaboration platform where developers build proof-based profiles, join communities (Tribes), compete in coding challenges, and collaborate on real projects.

Phase 1 MVP - Tribes System โœ…

This initial release focuses on the Tribes (community) system with:

  • โœ… GitHub OAuth authentication
  • โœ… Create & manage Tribes (public/private)
  • โœ… Join/leave Tribes
  • โœ… Role-based permissions (Admin/Member)
  • โœ… Row Level Security (RLS) for data protection
  • โœ… Developer profiles linked to GitHub
  • ๐Ÿ”œ Topics & Discussions (coming soon)
  • ๐Ÿ”œ Competitions & Leaderboards (coming soon)

โœจ Features

Current (Phase 1)

Feature Description
๐Ÿ” Authentication GitHub OAuth via Supabase Auth
๐Ÿ‘ฅ Tribes System Create and join developer communities
๐Ÿ‘ค Profiles Auto-generated from GitHub data
๐Ÿ›ก๏ธ Security Row Level Security (RLS) policies
๐Ÿ“ฑ Responsive UI Dark theme, developer-centric design

Planned (Phase 2 & 3)

See SCOPE.md for the complete product vision including:

  • ๐Ÿ’ฌ Topics & Discussions
  • ๐Ÿ† Competitions & Events
  • ๐Ÿ“Š Leaderboards & Rankings
  • ๐ŸŽฏ DevCom Score System
  • ๐Ÿข Company Accounts
  • ๐Ÿค Project Collaboration

๐Ÿ›  Tech Stack

Frontend

  • React 18 - UI library with hooks
  • TypeScript - Type safety and better DX
  • Vite - Fast build tool and dev server
  • Tailwind CSS - Utility-first CSS framework
  • Zustand - Lightweight state management
  • React Router - Client-side routing

Backend

  • Supabase - Backend as a Service
    • PostgreSQL database with real-time capabilities
    • Authentication (GitHub OAuth)
    • Row Level Security (RLS)
    • Real-time subscriptions

Development & Tooling

  • pnpm workspaces - Efficient package management
  • ESLint - Code linting
  • Prettier - Code formatting
  • Supabase CLI - Local development

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/YOUR_USERNAME/HashTribe.git
    cd HashTribe
  2. Install dependencies

    pnpm install
  3. Start Supabase locally

    pnpm supabase:start

    This will output your local Supabase credentials:

    API URL: http://localhost:54321
    anon key: eyJh...
    service_role key: eyJh...
    
  4. Configure environment variables

    cp .env.example .env

    Edit .env and add your Supabase credentials:

    VITE_SUPABASE_URL=http://localhost:54321
    VITE_SUPABASE_ANON_KEY=your_anon_key_here
  5. Run database migrations

    pnpm db:migrate
  6. Configure GitHub OAuth

    a. Create a GitHub OAuth App:

    b. Add to Supabase:

    • Open Supabase Studio: http://localhost:54323
    • Go to Authentication โ†’ Providers โ†’ GitHub
    • Enable GitHub and add your Client ID and Secret
    • Save
  7. Start the development server

    pnpm dev

    The app will open at http://localhost:5173

Installation (Using Docker)

Prerequisites

  • Docker 20+
  • Docker Compose
  1. Clone the repository
git clone https://github.com/YOUR_USERNAME/HashTribe.git
cd HashTribe
  1. Configure environment variables

Copy the example env file:

cp .env.example .env

Edit .env and add your Supabase credentials:

VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-public-anon-key

Only use the anon key, never the service role key in the frontend.

  1. Build and run the project
docker compose up --build
  • Docker will build the frontend app with your .env keys

  • Nginx serves the production-ready app

  • Open your browser at:

http://localhost:5173

  1. Optional: GitHub OAuth Setup

    1. Create a GitHub OAuth App:
    1. Add OAuth credentials in Supabase:
    • Open Supabase Studio โ†’ Authentication โ†’ Providers โ†’ GitHub

    • Enable GitHub and add your Client ID & Secret

  2. Access the App

Once Docker is running, the app will be available at:

http://localhost:5173

First Login

  1. Click "Continue with GitHub"
  2. Authorize the application
  3. You'll be redirected back and your profile will be auto-created
  4. Start creating Tribes!

๐Ÿ“ Project Structure

HashTribe/
โ”œโ”€โ”€ ๐Ÿ“ apps/
โ”‚   โ””โ”€โ”€ ๐Ÿ“ web/                 # React frontend
โ”‚       โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚       โ”‚   โ”œโ”€โ”€ ๐Ÿ“ components/  # Reusable components
โ”‚       โ”‚   โ”œโ”€โ”€ ๐Ÿ“ pages/       # Page components
โ”‚       โ”‚   โ”œโ”€โ”€ ๐Ÿ“ stores/      # Zustand stores
โ”‚       โ”‚   โ”œโ”€โ”€ ๐Ÿ“ lib/         # Utilities & config
โ”‚       โ”‚   โ””โ”€โ”€ App.tsx         # Main app component
โ”‚       โ””โ”€โ”€ package.json
โ”œโ”€โ”€ ๐Ÿ“ packages/
โ”‚   โ””โ”€โ”€ ๐Ÿ“ shared/              # Shared types & utilities
โ”‚       โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚       โ”‚   โ”œโ”€โ”€ ๐Ÿ“ types/       # TypeScript types
โ”‚       โ”‚   โ””โ”€โ”€ ๐Ÿ“ utils/       # Utility functions
โ”‚       โ””โ”€โ”€ package.json
โ”œโ”€โ”€ ๐Ÿ“ supabase/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ migrations/          # Database migrations
โ”‚   โ”œโ”€โ”€ seed.sql                # Seed data
โ”‚   โ””โ”€โ”€ config.toml             # Supabase config
โ”œโ”€โ”€ .env.example                # Environment template
โ”œโ”€โ”€ pnpm-workspace.yaml         # Workspace config
โ””โ”€โ”€ package.json                # Root package

๐Ÿงช Development

Available Scripts

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm preview Preview production build
pnpm lint Run ESLint
pnpm type-check Run TypeScript checks
pnpm db:types Generate TypeScript types from DB
pnpm db:reset Reset local database
pnpm db:migrate Run migrations
pnpm supabase:start Start local Supabase
pnpm supabase:stop Stop local Supabase

Database Schema

Key tables:

  • users - User profiles (linked to auth.users)
  • tribes - Communities
  • tribe_members - Membership with roles
  • topics - Discussion topics (Phase 1)
  • topic_replies - Replies to topics (Phase 1)
  • competitions - Coding competitions (Phase 1)
  • competition_participants - Competition entries (Phase 1)

See supabase/migrations/ for complete schema and RLS policies.


๐Ÿค Contributing

We welcome contributions! HashTribe is built for ECWoC (Engineering College Winter of Code) and open-source contributors.

Quick Start

  1. Check CONTRIBUTING.md for detailed guidelines
  2. Look for issues labeled good-first-issue
  3. Comment on an issue to get it assigned
  4. Fork, code, and submit a PR!

Issue Labels

Label Description
good-first-issue Perfect for newcomers
frontend React/UI work
backend Supabase/Database work
rls Row Level Security policies
bug Something isn't working
enhancement New feature

๐Ÿ—บ Roadmap

โœ… Phase 1 - MVP (Current)

  • Project setup & architecture
  • GitHub OAuth authentication
  • Tribes CRUD with RLS
  • Membership management
  • Topics & discussions
  • Basic competitions
  • Leaderboards

๐Ÿ”œ Phase 2 - Growth

  • LeetCode/HackerRank integration
  • Company accounts
  • Hiring challenges
  • DevCom Score v2
  • Profile analytics

๐Ÿ”ฎ Phase 3 - Scale

  • AI-powered matching
  • Advanced analytics
  • Recruiter tools
  • Global rankings
  • Mobile app

See SCOPE.md for the complete product vision.


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Built for ECWoC (Engineering College Winter of Code)
  • Powered by Supabase
  • UI inspired by modern developer tools

๐Ÿ“ž Contact


Built with โค๏ธ by developers, for developers

โญ Star this repo if you find it useful!