This is the server for the Orga application.
To install dependencies:
bun installTo run the development server:
bun --watch src/http/server.tsThis project was created using bun init in bun v1.2.20. Bun is a fast all-in-one JavaScript runtime.
- POST
/auth/register- Register a new user.- Body:
name(string, required): The user's name.email(string, required): The user's email.password(string, required): The user's password.
- Body:
- POST
/auth/login- Authenticate a user with email and password.- Body:
email(string, required): The user's email.password(string, required): The user's password.
- Body:
- GET
/auth/github/callback- GitHub authentication callback. - GET
/user- Get the authenticated user's information.- Headers:
Authorization:Bearer <token>
- Headers:
- POST
/workspace- Create a new workspace.- Headers:
Authorization:Bearer <token>
- Body:
name(string, required): The name of the workspace.
- Headers:
- GET
/workspace/:slug- Get a workspace by its slug.- Headers:
Authorization:Bearer <token>
- Headers:
- PUT
/workspace/:slug- Rename a workspace.- Headers:
Authorization:Bearer <token>
- Body:
name(string, required): The new name of the workspace.
- Headers:
- POST
/page- Create a new page.- Body:
title(string, required): The title of the page.icon(string, required): The icon of the page.coverImage(string, optional): The cover image of the page.data(string, required): The content of the page.workspaceId(string, required): The ID of the workspace the page belongs to.
- Body: