How astra1127/civilcraft works
Civil Craft is a game community website with player and administrator dashboards. Visitors browse public content; players sign in through PlayFab to use dashboard features, including the shop; staff use separate server-verified administrator credentials to manage the site and game data. Server-side request handling dispatches API requests to wallet and content services. The repository also documents payment and game-wallet capabilities, represented here as distinct stages. Several routes and integrations were not sampled, so their internal links are omitted rather than inferred.
Main entry points: server.ts API dispatcher · dashboard.index.tsx Dashboard pages · orders.server.ts Payment orders · service.server.ts Game wallet
Components 23
Public website
- Public pages
src/routes/index.tsx - Community and news
src/routes/community.index.tsx - Content services
src/lib/cms
Player experience
- Dashboard pages
src/routes/dashboard.index.tsx - Player authentication
src/lib/auth.tsx - Leaderboards
src/lib/playfab/leaderboard.ts - Almanac
src/lib/almanac/content.ts
Administration
- Admin pages
src/routes/admin.index.tsx - Admin authentication
src/lib/admin-auth - PlayFab admin
src/lib/playfab/admin-service.ts
Game services
- PlayFab client
src/lib/playfab/client.ts - API dispatcher
src/server.ts
Commerce and wallet
- Payment API
src/lib/payments/api.server.ts - Payment orders
src/lib/payments/orders.server.ts - PayMongo
src/lib/payments/paymongo.server.ts - Shop products
src/lib/payments/products.ts - Order fulfillment
src/lib/payments/fulfillment.server.ts - Game wallet
src/lib/game-wallet/service.server.ts - Wallet database
src/lib/game-wallet/database.server.ts - Currency database
src/lib/payments/currency-database.server.ts
Other components
- Visitor
- Player
- Staff
Connections 24
- Visitor → Public pages: browses
README.md - Visitor → Community and news: browses
README.md - Player → Dashboard pages: uses
README.md - Staff → Admin pages: uses
README.md - Dashboard pages → Player authentication: checks identity
src/lib/auth.tsx - Player authentication → PlayFab client: validates session
src/lib/auth.tsx - Dashboard pages → Leaderboards: views
- Dashboard pages → Almanac: views
- Admin pages → Admin authentication: authenticates
README.md - Admin pages → PlayFab admin: manages game data
- API dispatcher → Content services: dispatches requests
src/server.ts - API dispatcher → Admin authentication: dispatches requests
src/server.ts - API dispatcher → PlayFab admin: dispatches requests
src/server.ts - API dispatcher → Game wallet: dispatches requests
src/server.ts - API dispatcher → Payment API: dispatches requests
src/server.ts - Dashboard pages → Shop products: shows shop
- Payment API → Payment orders: handles orders
- Payment orders → PayMongo: creates checkout
- Payment orders → Order fulfillment: fulfills paid orders
src/lib/payments/fulfillment.server.ts - Order fulfillment → Game wallet: credits rewards
src/lib/payments/fulfillment.server.ts - Game wallet → Payment orders: updates order
src/lib/game-wallet/service.server.ts - Game wallet → Wallet database: reads and writes
src/lib/game-wallet/service.server.ts - Wallet database → Currency database: uses connection
src/lib/game-wallet/database.server.ts - Wallet database → PlayFab admin: resolves game config
src/lib/game-wallet/database.server.ts