Stellar Wars is a next-generation Web3 gaming platform that combines DeFi yield mechanics with strategic PvP combat on the Stellar blockchain. Players stake XLM tokens, build armies, and raid other players to earn rewards—all while their staked assets generate passive yield.
"Stake. Battle. Earn."
- Connect Freighter wallet to deposit XLM
- Automatic 5% APY on staked balance
- Real-time balance updates
- Withdraw anytime (no lock-up period)
- Train three unit types: Archers, Infantry, Giants
- Each unit has different costs, capacity, and DPS
- Strategic army composition affects raid success
- Command Tokens system for training
- View all registered players with Power & Defense stats
- Initiate raids costing 100 XLM per attack
- Cinematic battle video during combat
- Winners receive XLM rewards from the prize pool
- Mint premium character skins as NFTs
- Rarities: Common, Rare, Epic, Legendary, Mythic
- Current collection: GAKU, GOT, VALK, EXTRA
- NFTs stored on Stellar via Freighter wallet
- Upgrade Shield Defense (+10 HP per upgrade)
- Higher defense = harder to raid
- Strategic balance: offense vs defense
| Technology | Version | Purpose |
|---|---|---|
| React | 19.2 | UI Framework |
| TypeScript | 5.9 | Type-safe development |
| Vite | 7.x | Build tool |
| TailwindCSS | 3.4 | Styling |
| Framer Motion | - | Animations |
| Lucide React | - | Icons |
| Technology | Purpose |
|---|---|
| Node.js + Express | REST API server |
| MongoDB Atlas | Cloud database |
| Mongoose | ODM for MongoDB |
| bcryptjs | Password hashing |
| JWT | Authentication |
| Netlify Functions | Serverless API |
| Technology | Purpose |
|---|---|
| Stellar Network | Fast, low-fee blockchain |
| Stellar SDK 14.4 | Blockchain interaction |
| Freighter Wallet | Browser wallet extension |
| XLM (Lumens) | Native currency |
Network: Stellar Mainnet / Testnet
Transaction Fee: ~$0.00001 per transaction
Confirmation Time: 3-5 seconds
| Purpose | Address |
|---|---|
| Game Vault | GBYXWKRQVBMVQZ7ZLYQKNWFVJVQW6XJHQMVQZ7ZLYQKNWFVJVQW6XJH |
| Treasury | GCK5IIOTUSM64HZPN7M6ARVM7QIMMYJYA6S5WZN2CB3VVCSKLW7R7JR4 |
| NFT Issuer | STELLAR_WARS_NFT_ISSUER |
- Stake Raid: 100 XLM per raid
- NFT Minting: Variable (100-150 XLM)
- Shield Upgrade: 10 XLM per upgrade
- Node.js 18+
- npm or yarn
- Freighter Wallet browser extension
- MongoDB Atlas account (for backend)
-
Clone the repository
git clone https://github.com/bytes06runner/web_3.git cd web_3 -
Install backend dependencies
npm install
-
Install frontend dependencies
cd frontend npm install -
Environment Setup
Create
.envfile in root:MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret PORT=3000
-
Run the development servers
Backend (from root):
node server.js
Frontend (from /frontend):
npm run dev
-
Open in browser
http://localhost:5173
web_3/
├── server.js # Express API server (MongoDB)
├── .env # Environment variables
├── package.json # Backend dependencies
├── STELLAR_WARS_PITCH.txt # Full project documentation
│
└── frontend/
├── index.html # Entry HTML
├── vite.config.ts # Vite build config
├── tailwind.config.js # TailwindCSS theme
├── netlify.toml # Netlify deployment config
│
├── netlify/functions/ # Serverless API functions
│ ├── db.js # MongoDB connection
│ ├── auth-login.js # Login endpoint
│ ├── auth-register.js # Registration endpoint
│ ├── users-all.js # Get all users
│ └── users-by-wallet.js # Get user by wallet
│
├── public/assets/ # Static assets
│ ├── char_*.png # Character images
│ ├── parchment_scroll.png
│ └── ...
│
└── src/
├── App.tsx # Main application
├── index.css # Global styles
│
├── components/
│ ├── Header.tsx # Navigation header
│ ├── Dashboard.tsx # Stats HUD
│ ├── Barracks.tsx # Army training
│ ├── BattleArena.tsx # PvP matchmaking
│ ├── BattleInterface.tsx # Combat modal
│ ├── NftShop.tsx # NFT marketplace
│ └── ...
│
├── pages/
│ ├── Login.tsx # Authentication
│ └── Register.tsx # Account creation
│
└── services/
├── authService.ts # Auth logic
├── mockContract.ts # Game state
├── stellarService.ts # Stellar SDK
└── walletService.ts # Freighter wallet
| Environment | URL |
|---|---|
| Production | https://stellar-wars.netlify.app |
| Function Logs | https://app.netlify.com/projects/stellar-wars/logs/functions |
- Push to GitHub
- Connect repo to Netlify
- Set environment variables:
MONGODB_URIJWT_SECRET
- Deploy triggers automatically on push
cd frontend
npm run build
npx netlify deploy --prod --dir=dist- Core gameplay loop
- Freighter wallet integration
- PvP Battle Arena
- Cinematic battle videos
- NFT Shop with minting
- MongoDB user persistence
- Netlify Functions deployment
- Soroban smart contracts (on-chain logic)
- Guild system (team battles)
- Tournament system with prize pools
- Mobile app (React Native)
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
| Role | Name | GitHub |
|---|---|---|
| Developer | Srijeet Banerjee | @bytes06runner |
- Live Demo: https://stellar-wars.netlify.app
- GitHub: https://github.com/bytes06runner/web_3
- Stellar: https://stellar.org
- Freighter Wallet: https://www.freighter.app
- contract adress: "GDCPQHJJUY7TFYKIVRL3LQ32R5W5IGFFUE3MQTXCGCA7MZLWTTRVFQDA"
Built with ❤️ on Stellar Blockchain
⭐ Star this repo if you found it helpful!