An interactive card battle game built with the MERN stack (MongoDB, Express.js, React, Node.js), inspired by Sui/SuiFrens aesthetics. The app features card evolution, PvP-style battles, a world/battle map, and Google authentication. Frontend is Vite + React + Tailwind; backend is Express + MongoDB with a REST API.
- Card Evolution: Level up cards to unlock stats and abilities
- Battle System: Turn-based card battles (PvP-style experience)
- Battle Map: Navigate a dynamic map to discover challenges
- Google Authentication: Simple sign-in for players
- MERN Architecture: React + Vite frontend, Express + MongoDB backend
- Asset-rich UI: Optimized images, SFX, and themed visuals
staking-platfom-sui/
├─ front-end/ # Vite + React + Tailwind app
│ ├─ src/
│ │ ├─ pages/ # Game pages (BattleGround, Map, Market, Login, etc.)
│ │ ├─ components/ # UI components (Nav, etc.)
│ │ └─ utils/ # API helpers, zk login setup
│ └─ public/ # Images, audio, and static assets
└─ backend/ # Express REST API + MongoDB models
├─ models/ # Mongoose schemas (user, card, collections)
├─ controllers/ # Business logic
└─ routes/ # API routes (users, cards, collections)
- Node.js 18+
- MongoDB (local or Atlas)
cd backend
npm install
# Create .env
copy NUL .env
# Then add the following keys:
# MONGODB_URI=mongodb://localhost:27017/suifrenia
# PORT=4000
# JWT_SECRET=changeme
# CLIENT_URL=http://localhost:5173
# Run dev server
npm run dev
# or
npm startcd front-end
npm install
# Create .env (Vite)
copy NUL .env
# VITE_API_BASE_URL=http://localhost:4000
npm run dev
# App will run on http://localhost:5173Base URL: http://localhost:4000
POST /api/users/login– Google login / session creationGET /api/cards– List cardsPOST /api/cards– Create/upgrade card (auth required)GET /api/collections– List collectionsPOST /api/collections– Create collection (auth required)
Note: Exact endpoints may vary; see backend/routes/*.js and backend/controllers/*.js for full details.
- Frontend uses Vite and Tailwind; static assets are under
front-end/public - Backend uses Express + Mongoose with a modular folder layout
- A lightweight Node proxy is available under
front-end/node-api/server-api.jsif needed - Consider adding robust auth middleware and validation for production
- Frontend: Netlify/Vercel (Vite static build)
npm run buildinfront-end, then uploaddist
- Backend: Vercel/Render/Fly/Heroku (Express + MongoDB)
- Ensure environment variables are configured (MongoDB URI, JWT secret)
- Repo includes
backend/vercel.jsonfor Vercel deployment hints
Add gameplay and UI screenshots from front-end/public (e.g., landing1.png, battle views) to showcase features.
PRs and issues are welcome. Please:
- Keep changes small and focused
- Update documentation when adding features
- Add basic tests where reasonable