Skip to content

DanVerse-API is a Django Rest Framework API that supports user roles, content creation, commenting, and features like liking and loving posts. It's a dynamic platform for content creators and readers to engage and connect through blogs and discussions

Notifications You must be signed in to change notification settings

bongomin/DanVerse-API

Repository files navigation

# DanVerse API
DanVerse API is a Django RESTful API I designed to manage blog posts, comments, user profiles, tags, likes, and loves. It serves as the backend for your blogging platform.

## Features

- **Blog Posts:** Create, read, update, and delete blog posts.
- **Comments:** Allow users to comment on blog posts.
- **User Profiles:** Manage user profiles with additional information.
- **Tags:** Categorize blog posts using tags.
- **Likes and Loves:** Add likes and loves to blog posts.

## API Endpoints

The API provides the following endpoints:

- **Blog Posts:**
  - `GET /api/v1/blogs/`: Get a list of all blog posts.
  - `GET /api/v1/blogs/{blog_id}/`: Get details of a specific blog post.
  - `POST /api/v1/blogs/`: Create a new blog post.
  - `PUT /api/v1/blogs/{blog_id}/`: Update an existing blog post.
  - `DELETE /api/v1/blogs/{blog_id}/`: Delete a blog post.

- **Comments:**
  - `GET /api/v1/comments/`: Get a list of all comments.
  - `GET /api/v1/comments/{comment_id}/`: Get details of a specific comment.
  - `POST /api/v1/comments/`: Add a new comment.
  - `PUT /api/v1/comments/{comment_id}/`: Update an existing comment.
  - `DELETE /api/v1/comments/{comment_id}/`: Delete a comment.

- **User Profiles:**
  - `GET /api/v1/users/`: Get a list of all user profiles.
  - `GET /api/v1/users/{user_id}/`: Get details of a specific user profile.
  - `POST /api/v1/users/`: Create a new user profile.
  - `PUT /api/v1/users/{user_id}/`: Update an existing user profile.
  - `DELETE /api/v1/users/{user_id}/`: Delete a user profile.

- **Tags:**
  - `GET /api/v1/tags/`: Get a list of all tags.
  - `GET /api/v1/tags/{tag_id}/`: Get details of a specific tag.
  - `POST /api/v1/tags/`: Create a new tag.
  - `PUT /api/v1/tags/{tag_id}/`: Update an existing tag.
  - `DELETE /api/v1/tags/{tag_id}/`: Delete a tag.

- **Likes and Loves:**
  - `POST /api/v1/posts/{post_id}/like/`: Add a like to a blog post.
  - `POST /api/v1/posts/{post_id}/love/`: Add a love to a blog post.
  - `DELETE /api/v1/posts/{post_id}/like/`: Remove a like from a blog post.
  - `DELETE /api/v1/posts/{post_id}/love/`: Remove a love from a blog post.

## Getting Started

1. Clone the repository:

   ```bash
   git clone git@github.com:bongomin/DanVerse-API.git
   cd danverse-api
  1. Install dependencies:

    pip install -r requirements.txt
  2. Configure environment variables:

    Create a .env file in the project root and add the necessary environment variables.

    DEBUG=True
    SECRET_KEY=your_secret_key
    DATABASE_URL=your_database_url
  3. Run migrations:

    python manage.py migrate
  4. Start the development server:

    python manage.py runserver

Deployment

restful Screenshot 2023-11-08 at 4 53 58 PM Screenshot 2023-11-08 at 4 53 46 PM

The API is deployed on Railway. Ensure your production environment variables are correctly configured.

Contributing

If you would like to contribute to this project, please follow the Contributing Guidelines.

About

DanVerse-API is a Django Rest Framework API that supports user roles, content creation, commenting, and features like liking and loving posts. It's a dynamic platform for content creators and readers to engage and connect through blogs and discussions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages