Welcome to the Story Stream API! This API provides endpoints for managing users, profiles, articles, ratings, bookmarks, and more.
The Story Stream API is designed to handle various functionalities related to user-generated content, including user authentication, profile management, article creation, and interaction through ratings and bookmarks.
- User Authentication (Login, Registration, Password Reset)
- User Profile Management
- Article Creation and Management
- Rating and Bookmarking System
- Search Functionality with Elasticsearch
To get started with the Story Stream API, follow these steps:
All the neccessary commands can be found in "commands.txt"
-
Clone the repository:
git clone https://github.com/mahir-hs/Story-Stream.git cd Story-Stream
-
Create and configure environment variables:
Copy the example environment files and update them with your settings.
cp .envs/.local/.django.example .envs/.local/.django cp .envs/.local/.postgres.example .envs/.local/.postgres
-
Build and start the Docker containers:
docker compose -f local.yml up --build -d --remove-orphans
-
Apply migrations and create a superuser:
Open a new terminal and run the following commands:
docker compose -f local.yml run --rm api python manage.py makemigrations docker compose -f local.yml run --rm api python manage.py migrate docker compose -f local.yml run --rm api python manage.py createsuperuser
-
Access the application:
- The API will be available at
http://localhost:8080/api/v1/
- The Django admin will be available at
http://localhost:8080/supersecret/
- The API documentation (Redoc) will be available at
http://localhost:8080/redoc/
- Elasticsearch will be available at
http://localhost:9200/
- PgAdmin will be available at
http://localhost:5050/
- MailHog will be available at
http://localhost:8025/
- Flower will be available at
http://localhost:5555/
- The API will be available at
If you prefer not to use Docker, you can set up the project manually:
-
Create a virtual environment and activate it:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
You can use the API endpoints to interact with the Story Stream platform. Below are some example endpoints:
- User Details:
/api/v1/auth/user/
- User Registration:
/api/v1/auth/registration/
- Password Reset Confirm:
/api/v1/auth/password/reset/confirm/<uidb64>/<token>/
- Profiles:
/api/v1/profiles/
- Articles:
/api/v1/articles/
- Ratings:
/api/v1/ratings/
- Bookmarks:
/api/v1/bookmarks/
- Responses:
/api/v1/responses/
- Elasticsearch:
/api/v1/elastic/
For detailed API documentation, please visit Story Stream API Documentation.
We welcome contributions! Please read our Contributing Guidelines for more information on how to get started.
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for using the Story Stream API! If you have any questions or need further assistance, feel free to open an issue or contact us at mahirhasan333@gmail.com.