How subrotokumar7/article-arena-client works
Article Arena is a multi-role article-contest platform. Users discover contests, view details, pay to participate, and track joined contests or wins; creators manage contests and participants and declare winners; admins approve contests and manage roles. The frontend routes those tasks into public pages and role-specific dashboards, with authentication and secured API access supporting the workflows. README documents payment and submission capabilities, but sampled source does not show the backend implementation or all submission mechanics; those links are represented only where documented.
Main entry points: router.jsx Route dispatch · AuthProvider.jsx Firebase authentication · useAxiosSecured.jsx Secured API client · Auth Sign in and register
Components 22
Web experience
- Route dispatch
src/routes/router.jsx - Public pages
src/pages/Home - Role dashboard
src/layout/DashboardLayout.jsx
Identity and access
- Sign in and register
src/pages/Auth - Firebase authentication
src/provider/AuthProvider.jsx - Firebase Auth
src/firebase/firebase.config.js - Role lookup
src/hooks/useRole.jsx - Secured API client
src/hooks/useAxiosSecured.jsx - Profile image upload
src/utils/uploadImage.js - Image hosting
- Auth context hook
src/hooks/useAuth.jsx
Contest workflows
- Contest discovery
src/pages/AllContest/AllContest.jsx - Contest details
src/pages/Details/Details.jsx - Contest payment
src/pages/Details/Details.jsx - Payment result
src/pages/Payment - Admin management
src/pages/Dashboard/Admin - Creator management
src/pages/Dashboard/Creator - Participation tracking
src/pages/Dashboard/User - Article Arena API
Results and profiles
- Winners and leaderboard
src/pages/LatestWinner - Profile management
src/pages/Dashboard/UpdateProfile/UpdateProfile.jsx
Other components
- Visitor or member
Connections 31
- Visitor or member → Route dispatch: navigates
src/routes/router.jsx - Route dispatch → Public pages: routes to
src/routes/router.jsx - Route dispatch → Contest discovery: routes to
src/routes/router.jsx - Route dispatch → Contest details: routes to
src/routes/router.jsx - Route dispatch → Payment result: routes to
src/routes/router.jsx - Route dispatch → Role dashboard: routes to
src/routes/router.jsx - Route dispatch → Sign in and register: routes to
src/routes/router.jsx - Route dispatch → Admin management: routes to
src/routes/router.jsx - Route dispatch → Creator management: routes to
src/routes/router.jsx - Route dispatch → Participation tracking: routes to
src/routes/router.jsx - Route dispatch → Winners and leaderboard: routes to
src/routes/router.jsx - Route dispatch → Profile management: routes to
src/routes/router.jsx - Sign in and register → Firebase authentication: authenticates
- Firebase authentication → Firebase Auth: uses
src/provider/AuthProvider.jsx - Firebase authentication → Auth context hook: provides context
src/provider/AuthProvider.jsx - Auth context hook → Firebase authentication: reads context
src/hooks/useAuth.jsx - Role dashboard → Role lookup: checks role
src/layout/DashboardLayout.jsx - Role lookup → Secured API client: queries role
src/hooks/useRole.jsx - Secured API client → Auth context hook: reads user
src/hooks/useAxiosSecured.jsx - Secured API client → Article Arena API: sends requests
src/hooks/useAxiosSecured.jsx - Contest details → Secured API client: loads contest
src/pages/Details/Details.jsx - Contest details → Contest payment: starts checkout
src/pages/Details/Details.jsx - Contest payment → Article Arena API: creates session
src/pages/Details/Details.jsx - Contest payment → Payment result: returns after payment
README.md - Participation tracking → Article Arena API: participates and submits
README.md - Creator management → Article Arena API: manages and declares
README.md - Admin management → Article Arena API: approves and assigns roles
README.md - Sign in and register → Profile image upload: uploads photo
src/pages/Auth/Register.jsx - Profile management → Profile image upload: uploads photo
src/pages/Dashboard/UpdateProfile/UpdateProfile.jsx - Profile image upload → Image hosting: uploads image
src/utils/uploadImage.js - Winners and leaderboard → Article Arena API: loads results
README.md