Skip to content

Latest commit

Β 

History

History
99 lines (75 loc) Β· 2.66 KB

File metadata and controls

99 lines (75 loc) Β· 2.66 KB

Developer Documentation | ShadowGame Systems

πŸ—οΈ Architecture Overview

ShadowGame is a high-performance, gamified learning platform built on the modern React ecosystem.

⚑ Tech Stack

  • Framework: Next.js 15 (App Router, Server Components)
  • Language: TypeScript
  • Styling: Tailwind CSS v4
  • Animations:
    • framer-motion (UI transitions)
    • gsap (Complex sequences)
  • 3D Graphics: react-three-fiber / drei (Hero elements, if applicable)
  • Editor: @monaco-editor/react (In-browser IDE)
  • State Management: zustand

πŸ“‚ Project Structure

β”œβ”€β”€ app/                  # Next.js App Router pages
β”‚   β”œβ”€β”€ layout.tsx        # Root layout (Theme provider, Font injection)
β”‚   β”œβ”€β”€ page.tsx          # Landing page
β”‚   └── globals.css       # Global styles & Theme variables
β”œβ”€β”€ components/           # React Components
β”‚   β”œβ”€β”€ landing/          # specific landing page sections (Hero, FAQ, etc.)
β”‚   └── ui/               # Reusable UI atoms (Buttons, Inputs)
β”œβ”€β”€ public/               # Static assets
└── docs/                 # Documentation

🎨 Theme System

We use a dual-theme system managed by next-themes and CSS variables in app/globals.css.

1. Dark Theme (default)

  • Concept: "Deep Space Cyber-Luxe"
  • Primary: Electric Purple / Neon Cyan
  • Background: Deep Void Black (#020005)

2. Light Theme

  • Concept: "Clean Tech / Corporate"
  • Primary: Deep Violet / Sky Blue
  • Background: Cool Gray (#F5F7FA)

Rule: All components MUST start with bg-background text-foreground (or semantic equivalents) to support both modes automatically. Avoid hardcoding colors like bg-black.


πŸš€ Getting Started

  1. Clone & Install

    npm install
  2. Environment Variables Copy .env.example to .env.

    DATABASE_URL="postgresql://..."
    NEXTAUTH_SECRET="secret..."
  3. Run Dev Server

    npm run dev

    Open http://localhost:3000.


🧩 Key Components

TextReveal

Used for headlines. Supports "mask-up" animation.

<TextReveal text="Hello World" />

ScrollAnimation

Wrapper for section entrances.

<ScrollAnimation preset="rotate-up">
  <YourComponent />
</ScrollAnimation>

MagneticButton

Framer motion wrapper that attracts the cursor.


πŸ”’ Security & Deployment

This project is configured for Vercel. Note: Deployment rights are reserved. Do not deploy public mirrors of this repository.