DevLoop is a social developer community app built with Next.js App Router. It includes authentication, a feed with search, post creation, post details with comments, and an admin dashboard.
- Sign in with email or OAuth
- Search the feed by title, tags, author name, and author handle
- Create posts with tags and optional image upload
- Edit your own posts
- View post details in a dialog with comments
- Add comments and replies
- Report or hide comments (moderation flow)
- Manage profile info and avatar
- Use the admin dashboard for overview, users, moderation, and settings
Public / App
/Feed with search/create-postPost editor (create or edit)/profileYour profile view/profile/[handle]Public profile view/settingsUser settings
Auth
/loginLogin page/callbackOAuth callback page
Admin
/adminRedirects to overview/admin/overviewAdmin summary dashboard/admin/usersUser management/admin/moderationModeration queue/admin/settingsAdmin settings/admin/not-authorizedAccess denied
The UI calls these backend endpoints:
Auth
POST /api/auth/loginPOST /api/auth/registerGET /api/auth/mePOST /api/auth/logoutGET /api/auth/:provider/login
Posts
GET /api/postsGET /api/posts/:idPOST /api/postsPATCH /api/posts/:idDELETE /api/posts/:id
Comments
GET /api/posts/:id/commentsPOST /api/posts/:id/commentsDELETE /api/comments/:idPATCH /api/comments/:id/status
Reactions + Reports
POST /api/reactionsPOST /api/reports
Admin
GET /api/admin/overviewGET /api/admin/usersGET /api/admin/posts/reportedGET /api/admin/reportsPATCH /api/admin/users/:id/rolePATCH /api/admin/users/:id/statusPATCH /api/admin/posts/:id/statusDELETE /api/admin/posts/:idPATCH /api/reports/:id
Uploads
POST /api/uploads/image
- React Query handles fetching and caching.
- The auth token is stored in Zustand and injected as a Bearer token by
lib/api/fetcher.ts. - UI updates optimistically for moderation actions in the post detail dialog.
- Next.js App Router
- React Query
- Zustand
- Tailwind CSS
- shadcn/ui components
Install dependencies:
npm installRun dev server:
npm run devOpen the app:
http://localhost:3000
Create a .env file and set:
NEXT_PUBLIC_API_BASE_URL=your_api_url
npm run dev # start dev server
npm run build # production build
npm run start # start production server
npm run lint # lintapp/ # Next.js routes
components/ # UI + feature components
hooks/ # React hooks
lib/ # API + helpers
store/ # Zustand stores