Welcome to the Hesses Social Platform API documentation! This API allows you to interact with various features of the social platform, including user management, hesses, likes, followers, privacy preferences, and more.
- Authentication 🔐
- Users 👥
- User Profile Images 🖼️
- Following 👂
- Blocking 🚫
- Follow Requests 🤝
- Hesses 🗨️🐍
- Hess Media Upload and Retrieval 📷
- Likes ❤️
- Feed 📰
- Search 🔍
- Privacy Preferences 🔒
- Getting Started 🚀
- Contributing 🤝
- License 📄
- POST
/api/auth/login
: User login. - POST
/api/auth/register
: User registration. - POST
/api/auth/forgot-password
: Request a password reset email. - POST
/api/auth/reset-password
: Reset password using a token. - POST
/api/auth/confirm-email
: Confirm user's email using a token.
- GET
/api/users/:id
: Get user details by ID. - PUT
/api/users/:id
: Update user details by ID. - DELETE
/api/users/:id
: Delete a user by ID.
- GET
/api/users/:id/profile-image
: Get user's profile image. - PUT
/api/users/:id/profile-image
: Update user's profile image. - DELETE
/api/users/:id/profile-image
: Delete user's profile image.
- POST
/api/users/:id/follow
: Request to follow a user. - PUT
/api/users/:id/follow
: Update following preferences for a followed user. - DELETE
/api/users/:id/follow
: Unfollow a user.
- POST
/api/users/:id/block
: Block a user. - DELETE
/api/users/:id/block
: Unblock a user.
- DELETE
/api/follow-requests/:id
: Cancel a sent follow request. - PUT
/api/follow-requests/:id/approve
: Approve a follow request. - PUT
/api/follow-requests/:id/reject
: Reject a follow request.
- POST
/api/hesses
: Create a new hess. - GET
/api/hesses/:id
: Get hess details by ID. - PUT
/api/hesses/:id
: Update hess details by ID. - DELETE
/api/hesses/:id
: Delete a hess by ID.
- POST
/api/hesses/:id/media
: Upload media files (images, videos, audio) to an existing hess. - GET
/api/hesses/:id/media/:id
: Get a hess media file by ID(s). - DELETE
/api/hesses/:id/media/:id
: Delete a hess media file by ID(s).
- POST
/api/hesses/:id/like
: Like a hess. - DELETE
/api/hesses/:id/like
: Unlike a hess.
- GET
/api/feed
: Get the feed.
- GET
/api/search/hesses
: Search for hesses. - GET
/api/search/users
: Search for users.
- GET
/api/users/:id/privacy
: Get user's privacy preferences. - PUT
/api/users/:id/privacy
: Update user's privacy preferences.
To use this API, follow these steps:
-
Clone this repository to your local machine.
-
Configure the following environment variables.
# Database Connection DATABASE_URL=<your_database_url> # JWT Configurations JWT_SECRET=<your_jwt_secret> JWT_EXPIRE_IN_HOURS=<jwt_expire_time_in_hours> # Account Activation Configurations ACCOUNT_ACTIVATION_LINK_PREFIX=<account_activation_link_prefix> ACCOUNT_ACTIVATION_TOKEN_EXPIRE_IN_HOURS=<activation_token_expire_time_in_hours> # Password Reset Configurations PASSWORD_RESET_LINK_PREFIX=<password_reset_link_prefix> PASSWORD_RESET_TOKEN_EXPIRE_IN_HOURS=<password_reset_token_expire_time_in_hours> # Details Included in Emails (you could include only a subset of these) FACEBOOK_LINK=<facebook_link> TWITTER_LINK=<twitter_link> LINKED_IN_LINK=<linkedin_link> INSTAGRAM_LINK=<instagram_link> FIRST_CONTACT_LINE=<first_contact_line> SECOND_CONTACT_LINE=<second_contact_line>
-
Run the application.
-
Access the API endpoints using the provided routes and methods.
If you'd like to contribute to this project, feel free to submit pull requests or open issues. Your contributions are greatly appreciated!
This project is licensed under the MIT License.