Skip to content

alik-r/1pixel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1Pixel

Tech Stack

  • Frontend: React 18 + TypeScript, Canvas-based grid renderer, Tailwind CSS, react-cropper
  • Backend: Node.js + Express + TypeScript
  • Database: Node.js built-in SQLite (node:sqlite)
  • Image processing: Sharp

How to Run

Development with Docker (recommended):

docker compose up --build

Both services support hot reload — edit files locally and changes reflect immediately.

Development without Docker (both servers with hot reload):

npm install && npm run dev

Or separately:

cd server && npm run dev    # Backend on :3001
cd client && npm run dev    # Frontend on :5173 (proxies API to :3001)

Production:

npm run build               # Build client
npm start                   # Serves everything from :3001

What's Implemented

  • 158x158 interactive grid with smooth Canvas-based pan/zoom (mouse + touch)
  • Purchase flow: click cell -> choose 1x1 ($1) or 5x5 ($25) -> enter username/email -> upload & crop image -> mock payment -> pending moderation
  • Admin panel (/admin routes, default password: admin) - approve/reject pending purchases
  • Leaderboard - ranked by total pixels owned
  • Pixel detail popup - click any purchased block to see full image, owner, and timestamp (UTC+4)
  • Legal modals - About, Privacy Policy, Terms of Service
  • Reservation system with 15-min TTL and automatic cleanup
  • Conflict detection - 409 if pixels already taken
  • Mock payment with optional failure simulation (fail: true in payment confirm)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages