Skip to content

HiteshShonak/Code-Afterlife

Repository files navigation

⚰️ Code Afterlife

Next.js 16 React 19 PostgreSQL Prisma 6 Tailwind CSS v4 Auth.js v5 Groq AI Three.js MIT License

Build. Decay. Resurrect.
A cinematic digital afterlife for software projects. Give your abandoned code a resting place, or resurrect dead projects to build their lineage.

Experience Code Afterlife Live


Code Afterlife is a full-stack platform built to honor the lifecycle of open-source and indie software. Projects are tracked organically through a dynamic state machine: aging from Born, to Active, to Stalled, and finally Dead. Dead projects can be claimed and resurrected by new developers, spawning intricate family trees.


🌟 Key Features

πŸͺ¦ 3D Graveyard & Project Lifecycles

  • Atmospheric 3D Graveyard: Explore an interactive, cinematic graveyard built with Three.js featuring volumetric fog, parallax moon haze, and dynamic tombstones for dead repositories.
  • Dynamic Aging & Decay: Projects age in real-time. If you stop pushing code to GitHub, your project decays from ACTIVE to STALLED, and eventually dies. As health drops, the UI visually fades and loses saturation.
  • Smart Health Algorithms: Advanced algorithms calculate momentum, consistency, and activity based on GitHub API integration to generate a 0-100 health score.
  • Shipped Immunity: Reaching the SHIPPED state grants a project immortality, freezing its health between 90-100 forever.

πŸ›οΈ The Hall of Legacy

  • Golden Showcase: A dedicated cinematic masonry grid that honors SHIPPED software, featuring rich GSAP scroll choreography and floating idea fragments to celebrate projects that survived.
  • Generational Tracking: A React Flow visualizer maps the family tree of a project, tracking its descendants and lineage depth across multiple resurrections.

⏳ Time Capsules & Artifacts

  • Interactive Unlock Sequence: A scroll-driven GSAP animation physically "unlocks" a glowing 3D-styled vault containing archived project memories.
  • Digital Relics: Creators can bury final messages, markdown readmes, and frozen roadmaps inside their projects.
  • Discovery: Future developers who resurrect the project will uncover these sealed capsules via a drag-and-drop React Flow canvas interface.

πŸ‘» AI-Powered Resident Chatbot

  • Deep Context: Every project page features an AI Chatbot (powered by Llama 3.3 70B via Groq) that has consumed the project's entire history, README, engagement metrics, lineage depth, and timeline.
  • Immersive Persona: The AI acts as a cinematic narrator of the Code Afterlife, refusing to break character while answering technical questions about the codebase's legacy.

πŸ“œ AI Pulse & Timeline Archives

  • Automated Chronicles: A background cron job syncs with your GitHub repositories once a day (12:00 Noon IST), with a manual fetch override available every 6 hours.
  • Cinematic Summaries: The AI generates extremely concise, atmospheric summaries (max 30 words) of your latest commits to build an automated timeline.
  • Epitaphs: When a project dies, the AI generates a poetic death reason.

🧬 Resurrection & Ecosystem

  • Forking from the Grave: Any user can resurrect a DEAD project.
  • Community Signals: Vote "Will Ship / Will Die" on active projects.

🀯 Under the Hood (Technical Highlights)

The platform is engineered with obsessive attention to frontend performance, cinematic rendering, and complex state management:

  • Procedural 3D Generation: The Graveyard Canvas utilizes Three.js and custom vertex/fragment shaders to generate infinite noise-based terrain, dynamic grass blades (rendering 12,000+ instanced meshes efficiently), and rolling ground fog that evolves over time.
  • Advanced State Machines & Health Algorithms: A rigorous state-machine tracks projects from BORN -> ACTIVE -> STALLED -> DEAD (or SHIPPED). A mathematical health calculator evaluates GitHub commit consistency, month-over-month momentum, and applies specific exponential decays based on project states.
  • Performant Visual Choreography: Built with GSAP ScrollTrigger and Framer Motion, the landing page executes heavy parallax, scroll-scrubbed vault unlocks, and SVG path drawing with near-zero JavaScript RAF (Request Animation Frame) costs by offloading complex floating animations to pure CSS where possible.
  • Generative AI Narratives: Connected to LLaMA-3.3-70B-Versatile via the Groq API, the ai-pulse engine synthesizes raw GitHub commit histories and Markdown READMEs into poetic, 30-word cinematic observations, bringing dead projects back to life emotionally.

πŸ› οΈ Technology Stack

Frontend

Layer Technology
Core Next.js 16 (App Router), React 19
State React Hooks + Server Actions
Styling Tailwind CSS v4, clsx, tailwind-merge
Motion Framer Motion, GSAP, React Three Fiber (3D Elements)
UI/UX Lenis (Smooth Scrolling), Lucide React (Icons)
Visuals React Flow (Lineage Trees)

Backend

Layer Technology
Runtime Node.js, Next.js API Routes
Database PostgreSQL (Neon), Prisma ORM 6
Auth NextAuth.js v5 (Auth.js)
Validation Zod
AI Groq SDK (Llama 3.3 70B Versatile), Vercel AI SDK
Email Resend
Testing Vitest (Unit and State Machine Testing)

πŸ“‚ Project Structure

Code Afterlife/
β”œβ”€β”€ prisma/                            # Database schema (PostgreSQL) and seeders
β”œβ”€β”€ public/                            # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ actions/                       # Next.js Server Actions (Mutations)
β”‚   β”œβ”€β”€ app/                           # App Router (Pages, API routes, Layouts)
β”‚   β”œβ”€β”€ components/                    # UI Components (ProjectChatbot, Timeline, etc.)
β”‚   β”œβ”€β”€ config/                        # Global configs (Health math constraints)
β”‚   β”œβ”€β”€ lib/                           # Core logic (AI Pulse, State Machine)
β”‚   β”œβ”€β”€ services/                      # Complex Backend Orchestration
β”‚   β”œβ”€β”€ types/                         # TypeScript definitions
β”‚   └── __tests__/                     # Vitest Test Suites
β”œβ”€β”€ vitest.config.ts                   # Testing configuration
β”œβ”€β”€ README.md                          # This file
β”œβ”€β”€ DOCUMENTATION.md                   # Deep technical architecture
└── package.json                       # Dependencies & Scripts

πŸš€ Getting Started

Prerequisites

  • Node.js v20+
  • PostgreSQL database
  • Groq API Key (for AI features)
  • GitHub OAuth App (for authentication)
  • GitHub Personal Access Token (for fetching commits)

Installation

  1. Clone the repository

    git clone https://github.com/HiteshShonak/code-afterlife.git
    cd code-afterlife
  2. Install Dependencies

    npm install
  3. Configure Environment Variables Create a .env.local file based on .env.sample. View DOCUMENTATION.md for the full list of required and optional keys.

  4. Initialize Database

    npm run db:push
    npm run db:seed
  5. Start Development Server

    npm run dev

    Access the app at http://localhost:3000


πŸ›‘οΈ Core Systems Design

Feature Implementation Details
State Machine Rigid transition validation (src/lib/state-machine.ts) ensuring DEAD projects can only be resurrected to ACTIVE, and SHIPPED projects are completely immutable.
Health Calculator Dynamic algorithm that factors momentum, consistency (30-day window), and activity. Dynamically caps scores based on state (e.g. DEAD decays automatically to 0).
AI Cron Sync Background route /api/cron/ai-pulse checks repositories and automatically handles timeline creation and health decay logic.

πŸ—ΊοΈ Pages Overview

Page Route Description
Landing / Thematic landing page showcasing the graveyard
Dashboard /dashboard User portal to manage living and resurrected projects
Explore /explore Browse and filter projects by their lifecycle state
Search /search Weighted SQL search by tech stack and title
Project View /project/[slug] Comprehensive project timeline, lineage, and AI chat
Graveyard /graveyard Dedicated 3D feed for abandoned (DEAD) projects
Lineage /lineage/[slug] Interactive visual family tree of resurrections

πŸ“– Deep Technical Documentation

For full details on the health math algorithms, rigorous state machine constraints, API routes, cron jobs, and architectural patterns, please read our comprehensive DOCUMENTATION.md.


🀝 Contribution

This project explores the intersection of open-source legacy and artificial intelligence. Contributions, bug reports, and feature requests are welcome.


πŸ“ License

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


© 2026 Code Afterlife. Built with ❀️ by Hitesh Sharma.

Releases

No releases published

Packages

 
 
 

Contributors