Skip to content

Papun1111/Valhalla-brush

Repository files navigation

Valhalla Brush

Next.js TypeScript Tailwind CSS Prisma PostgreSQL Turborepo Nginx DevOps


🚀 Overview

Valhalla Brush is a real-time, multiplayer canvas application where users can:

  • 🔗 Create or join drawing rooms
  • ✍️ Collaboratively sketch, write, and visualize ideas
  • 🔄 Share live canvas updates with all participants

This is an early-stage project; many features (e.g., authentication, advanced tools, session recording) will be added soon.


✨ Features

  • Room Management

    • Create new canvas rooms
    • Join existing rooms via unique URLs
  • Live Collaboration

    • Real-time drawing and writing sync
    • Multi-user cursors and color indicators
  • Share & Persist

    • Share room links instantly
    • Canvas state persisted in PostgreSQL

🛠 Tech Stack

Layer Technology
Frontend Next.js, TypeScript
Styling Tailwind CSS
Backend Next.js API routes
Database & ORM PostgreSQL, Prisma
Monorepo Turborepo
Deployment & DevOps Nginx (reverse proxy), Docker, CI/CD pipelines

📦 Installation & Setup

  1. Clone the Repo

    git clone https://github.com/your-org/valhalla-brush.git
    cd valhalla-brush
  2. Install Dependencies

    npm i -g pnpm install
    pnpm install
  3. Environment Variables Create a .env file in the root:

    DATABASE_URL="postgresql://user:password@localhost:5432/valhalla"
  4. Database Migrations

    cd packages
    cd db
    touch .env
    DATABASE_URL="postgresql://postgres:password@localhost:5432/postgres"
    npx prisma migrate dev --name init\
    npx prisma generate
  5. Run Locally

    pnpm run dev

    Open http://localhost:3000


☁️ Deployment

  1. Build

    pnpm run build
  2. Reverse Proxy (Nginx)

    server {
      listen       80;
      server_name  your-domain.com;
      
      location / {
        proxy_pass         http://app:3000;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection 'upgrade';
        proxy_set_header   Host $host;
        proxy_cache_bypass $http_upgrade;
      }
    }

4

📈 Roadmap

  • User authentication & profiles
  • Colour picker & brush settings
  • Undo/redo functionality
  • Session recording & playback
  • Export canvas as image/PDF

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/name)
  3. Commit your changes (git commit -m "feat: add new feature")
  4. Push to branch (git push origin feature/name)
  5. Open a Pull Request

📜 License

Distributed under the MIT License. See LICENSE for details.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published