Skip to content

Tanmayi30/hashtribe

 
 

Repository files navigation

🔷 HashTribe

A developer-first community and collaboration platform

License: MIT TypeScript React Supabase Vite Tailwind CSS

FeaturesTech StackGetting StartedContributingRoadmap


📸 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 AuthenticationProvidersGitHub
    • 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!

About

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 91.9%
  • PLpgSQL 5.3%
  • JavaScript 0.9%
  • CSS 0.9%
  • Shell 0.6%
  • Dockerfile 0.2%
  • HTML 0.2%