How waterrmalann/bit-warriors-nextjs works
Project type and purpose
• This is the frontend microservice of BitWarriors, a MERN-based, Next.js/React SSR application that serves as the UI layer in a larger microservices architecture. It handles user authentication flows, problem browsing/submission pages, dashboards, and landing pages. All backend operations (auth, problems, submissions, leaderboards, etc.) are exposed via a separate API Gateway and microservices (not in this repo).
File structure
• src/app/ (Next.js “app router”): server-rendered routes for
• /(landing): public landing, terms, privacy, guidelines
• /(auth): login, register, MFA, OAuth callbacks (GitHub/Google), email verification
• /(dashboard): home, problems, submissions, top, profile, user profiles
• src/components/: reusable UI components, top-level (Logo, CodeEditor, Terminal, etc.)
• src/components/ui/: design-system primitives (buttons, cards, forms, tables, toast, etc.)
• src/hooks/: data-fetch hooks that call the backend API via Axios
• src/lib/: Axios configuration, route constants, utility functions
• public/: static assets
• Config files: next.config.js, tailwind.config.js, tsconfig.json, ESLint, etc.
README for additional insights
• It’s part of a microservices ecosystem: this repo only contains the Next.js UI; the backend API Gateway + individual services (Auth, Problem, User, Leaderboard, etc.) live in a separate repo.
• Tech stack: Next.js (SSR/SSG), React, TypeScript, TailwindCSS, PNPM, Axios, Node/Express, MongoDB (backend).
Final advice
• Be granular: break down the frontend service into SSR, routing, UI layer, data-fetching layer, and static assets.
• all integration points: OAuth flows, API Gateway, microservices, DB.
• Critical configuration (e.g., next.config.js for redirects, tailwind.config for theming).