Conduit Backend (RealWorld)
A backend implementation of the RealWorld / Conduit specification built with TypeScript, Express, and Prisma with PostgreSQL.
Features
- Authentication & Users: JWT-based authentication, user registration, login, current user endpoint, profile updates.
- Profiles: Public profiles, follow/unfollow users.
- Articles: CRUD operations for articles, article feeds, filtering by tag/author/favorited, favoriting/unfavoriting.
- Comments: Add, get, and delete comments on articles.
- Tags: Retrieve list of all article tags.
API Endpoints
Authentication / Users
POST /api/users- Register a new userPOST /api/users/login- User loginGET /api/user- Get current userPUT /api/user- Update current user
Profiles
GET /api/profiles/:username- Get profilePOST /api/profiles/:username/follow- Follow userDELETE /api/profiles/:username/follow- Unfollow user
Articles
GET /api/articles- List articles (filters: tag, author, favorited, limit, offset)GET /api/articles/feed- Feed articles from followed usersGET /api/articles/:slug- Get single articlePOST /api/articles- Create articlePUT /api/articles/:slug- Update articleDELETE /api/articles/:slug- Delete articlePOST /api/articles/:slug/favorite- Favorite articleDELETE /api/articles/:slug/favorite- Unfavorite article
Comments
GET /api/articles/:slug/comments- Get comments for an articlePOST /api/articles/:slug/comments- Add comment to an articleDELETE /api/articles/:slug/comments/:id- Delete comment
Tags
GET /api/tags- Get all tags