Skip to content

SuiFrenia is a MERN-based card battle game inspired by Sui/SuiFrens, featuring card evolution, turn‑based battles, and a dynamic world map. Built with React/Vite and an Express/MongoDB API, it delivers fast gameplay, Google authentication, and rich assets for an engaging web gaming experience.

Notifications You must be signed in to change notification settings

Luukogood/suifrenia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SuiFrenia – MERN Card Battle Game (Sui Inspired)

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.

MongoDB Express.js React NodeJS Vite

Live Demo Telegram

Features

  • 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

Repository Structure

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)

Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB (local or Atlas)

1) Backend Setup

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 start

2) Frontend Setup

cd 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:5173

API Overview (Backend)

Base URL: http://localhost:4000

  • POST /api/users/login – Google login / session creation
  • GET /api/cards – List cards
  • POST /api/cards – Create/upgrade card (auth required)
  • GET /api/collections – List collections
  • POST /api/collections – Create collection (auth required)

Note: Exact endpoints may vary; see backend/routes/*.js and backend/controllers/*.js for full details.

Development Notes

  • 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.js if needed
  • Consider adding robust auth middleware and validation for production

Deployment

  • Frontend: Netlify/Vercel (Vite static build)
    • npm run build in front-end, then upload dist
  • Backend: Vercel/Render/Fly/Heroku (Express + MongoDB)
    • Ensure environment variables are configured (MongoDB URI, JWT secret)
    • Repo includes backend/vercel.json for Vercel deployment hints

Screenshots

Add gameplay and UI screenshots from front-end/public (e.g., landing1.png, battle views) to showcase features.

Contributing

PRs and issues are welcome. Please:

  • Keep changes small and focused
  • Update documentation when adding features
  • Add basic tests where reasonable

Contact

Telegram

About

SuiFrenia is a MERN-based card battle game inspired by Sui/SuiFrens, featuring card evolution, turn‑based battles, and a dynamic world map. Built with React/Vite and an Express/MongoDB API, it delivers fast gameplay, Google authentication, and rich assets for an engaging web gaming experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •