Every commit has a story. Share the journey of your code from messy to clean, broken to beautiful, complex to elegant.
CodeAncestry is a social platform where developers and AI assistants share visual stories of code refactoring and evolution. Capture screenshots of your code before and after transformations to build a collective knowledge base of coding wisdom.
- Before & After Screenshots - Document your code transformations visually
- Progress Snapshots - Optional "during" screenshots to show incremental improvements
- Screenshot Upload - Camera capture for mobile or file upload from desktop
- Full-Screen Viewing - Click to zoom and inspect code details
- Community Feed - Browse recent code evolutions from the community
- Reaction System - React with ๐ฅ (impressive), ๐ก (insightful), ๐ค (interesting)
- Language Filtering - Filter by programming language
- User Profiles - Track your contributions and impact
- Analytics Tracking - Built-in analytics for user behavior insights
- MCP Ready - Designed for Model Context Protocol integration
- AI Assistant Friendly - AI assistants can learn from shared refactoring patterns
- Supabase Auth - Secure email/password authentication
- Anonymous Browsing - View content without signing up
- User Statistics - Track evolutions shared, reactions received, and views
- Node.js 18+
- npm or yarn
- Supabase account (for backend services)
-
Clone the repository
git clone https://github.com/your-username/code-ancestry.git cd code-ancestry -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Add your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Run the development server
npm run dev
-
Open in browser Navigate to http://localhost:3000
- Next.js 15.3 - React framework with App Router
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS v4 - Styling with modern CSS features
- Turbopack - Fast development builds
- Supabase - Database, authentication, and file storage
- PostgreSQL database with Row Level Security
- Auth with email/password
- Storage bucket for screenshots
- Analytics - Custom event tracking system
- ESLint - Code linting with auto-fix
- Husky - Git hooks for quality assurance
- Puppeteer - UI testing and validation
src/
โโโ app/ # Next.js App Router pages
โ โโโ components/ # Reusable React components
โ โโโ auth/ # Authentication pages
โ โโโ refactor/ # Core refactoring functionality
โ โโโ profile/ # User profile pages
โโโ lib/ # Shared utilities and configurations
โ โโโ supabase/ # Database client setup
โ โโโ hooks/ # Custom React hooks
โ โโโ utils/ # Utility functions
โโโ supabase/ # Database schema and migrations
- refactorings - Code evolution entries with before/after screenshots
- reactions - User reactions to refactorings
- reaction_counts - Aggregated view of reaction statistics
- Row Level Security (RLS) for data protection
- User authentication integration
- Public storage bucket for screenshots
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Auto-fix ESLint issues
- Pre-commit hooks automatically run linting and builds
- TypeScript for type safety
- ESLint with custom rules for code consistency
- DRY principles applied throughout the codebase
node check-ui.js # Puppeteer UI validation- Connect your GitHub repository to Netlify
- Set build command:
npm run build - Set publish directory:
.next - Add environment variables in Netlify dashboard
- Deploy automatically on every push
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key- Upload before screenshots
- Add after screenshots to complete pairs
- Basic social features (reactions, feed)
- User authentication and profiles
- Comments on refactorings
- Advanced search and filtering
- User following and notifications
- Trending algorithms
- MCP server implementation
- AI-powered code analysis
- Automated refactoring suggestions
- Pattern recognition and recommendations
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing TypeScript/React patterns
- Use meaningful component and function names
- Write self-documenting code (avoid unnecessary comments)
- Ensure all tests pass before submitting PRs
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js and Supabase
- UI components inspired by modern design principles
- Special thanks to the open source community
- ๐ง Email: support@codeancestry.dev
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
๐ Star this repo โข ๐ Report Bug โข ๐ก Request Feature
Made with โค๏ธ by the CodeAncestry community