Skip to content

[BACKEND MEGATHREAD] Laying out a skeleton of the backend REST API serverΒ #23

@ujsquared

Description

@ujsquared

πŸš€ MEGA-ISSUE Backend REST API for Forum

πŸ“Œ Description

We need to implement a RESTful backend server for a forum web app. The main entities involved are:
Schema has already been defined in the scaffold by maintainers.


βœ… Required Features

  • CRUD for Topics, Threads, Posts
  • Offset-based pagination on Topics
  • Google OAuth authentication for Users (include required tokens/flows for frontend)
  • Anonymous post support with moderation (approved flag)
  • Upvote / Downvote system on Threads and Posts
  • Authenticated routes for creating threads/posts if not anonymous
  • Basic user profile endpoints (/me, etc.)

πŸ” Google OAuth Notes

  • Use OAuth 2.0 for authentication (Google Sign-In)
  • Frontend will need access to:
    • Google Client ID
    • Authorization flow
  • Backend will need to:
    • Verify ID tokens
    • Manage session / JWT tokens post-login
    • Store authenticated user in DB if not present

Instructions for contributors

  1. File an issue for the API route or feature you want to implement. Make sure there is no redundant work being done.
  2. Describe what your issue addresses.
  3. Make the relevant Pull Request.

πŸ’¬ API Checklist (Maintainers please update this with the needed API routes. Also update whenever an issue is closed and feature is fulfilled.)

User

  • /api/v1/user/<userid> - Gives information about the user

Posts

  • /api/v1/post/<postid> - Gives information about the user

Thread

  • /api/v1/thread/<threadid> - Gives information about the user

Topic

  • /api/v1/topic/topicid> - Gives information about the user

Auth

  • /api/v1/auth/<callback_url> Authorizes a user after receiving relevant data from OAuth

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Not Accepting PRsdocumentationImprovements or additions to documentationhelp wantedExtra attention is neededjavascriptPull requests that update javascript code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions