Paint your imagination, one pixel at a time! ๐๏ธ
Pixel Totsugeki is a real-time collaborative pixel art platform where every pixel tells a story. Inspired by Reddit's r/place, this digital canvas brings together artists and strategists in an epic battle of creativity.
@Configuration
public class BackendArchitecture {
@Bean
public TechnicalStack infrastructure() {
return TechnicalStack.builder()
.runtime("JVM 17 (HotSpot)")
.framework(Arrays.asList(
"Spring Boot 3.2",
"Spring Security 6.0",
"Spring WebSocket",
"Spring Data JPA"
))
.security(SecurityConfig.builder()
.authentication("OAuth2 with Google")
.authorization("JWT + Bearer token")
.websocketSecurity("STOMP + JWT")
.build())
.persistence(Arrays.asList(
"PostgreSQL 16",
"Hibernate ORM",
"Flyway Migrations"
))
.deployment(Arrays.asList(
"Docker + Docker Compose",
"Maven Build Tool",
"GitHub Actions CI/CD"
))
.build();
}
}const stack = {
framework: "React + Vite โก",
realtime: "STOMP WebSocket ๐",
styling: "Tailwind CSS ๐จ",
networking: "Axios ๐"
};java 17
node.js
docker
postgresql# Clone the masterpiece
git clone https://github.com/ThirdimpactDev/pixel-game.git
# Enter the arena
cd pixel-totsugeki
# Configure your .env
cat << EOF > .env
DB_USER=your_db_user
DB_PASS=your_db_password
DB_NAME=your_db_name
EOF
# Summon the database
docker-compose up -d
# Launch the backend
./mvnw spring-boot:run
# Deploy the frontend
cd frontend
npm install
npm run devGET /oauth2/authorization/google # Initiate login
GET /token.grant # Get JWT
GET /oauth2/redirect # OAuth2 callbackGET /colors # Available colors
GET /color/{colorId} # Specific color
WS /app/game.sendPixel # Place pixel
WS /app/game.subscribeGrid # Subscribe to updates
WS /topic/grid # Receive updates- User initiates Google OAuth2 login
- Server generates JWT after authentication
- Frontend stores JWT
- WebSocket connections use JWT for auth
- Select grid coordinates
- Choose color
- Deploy pixel via WebSocket
- Server validates
- All clients receive update
- OAuth2 + Google Authentication
- JWT Validation
- Protected WebSocket Routes
- CORS Shield
- Spring Security Fortress
"In the pixelated realm, every coordinate tells a story, every color marks a victory."
Made with โ๏ธ by ThirdImpact