Code Monkey home page Code Monkey logo

jaitaw's Introduction

Jaitaw API by Django

Introduction

This repository provides a mini Django REST Framework API for building a social media application. It offers essential features like user accounts, posts, comments, notifications, and tag-based post retrieval.

Features

  • User Accounts:
    • Login and registration
    • Profile management
    • Follower/following functionality
    • Secure authentication with JSON Web Tokens (JWT)
  • Posts:
    • Create, read, update, and delete posts
    • Like and save posts
    • Retrieve posts by code and liked/saved posts for a user
  • Comments:
    • Create, read, update, and delete comments
    • Like comments
    • Get comments for a specific post
  • Notifications:
    • View inbox notifications
    • Get notification badge count
    • Mark all notifications as read
  • Tags:
    • Retrieve posts by tag name

Installation

Prerequisites

  • Python (version 3.7 or later recommended)
  • pip (package installer for Python)

Setting Up a Virtual Environment (Recommended)

Mac/Linux:

  1. Open your terminal.
  2. Create a virtual environment using python3 -m venv venv
  3. Activate the environment: source venv/bin/activate

Windows:

  1. Open your command prompt.
  2. Create a virtual environment using python -m venv venv.
  3. Activate the environment: venv\Scripts\activate

Installing Dependencies

  1. Inside the activated virtual environment, run:

    pip install -r requirements.txt

Usage

  1. Clone this repository:

    git clone https://github.com/kimkorngmao/jaitaw.git
  2. Navigate to the project directory:

    cd jaitaw
  3. Create a local copy of the .env file (located in the project root) and add environment variables.

    SECRET_KEY=your_secret_key
    DEBUG=True
    ALLOWED_HOSTS=localhost,127.0.0.1  # Add additional allowed hosts if needed
    
  4. Apply database migrations:

    python manage.py migrate
  5. Run the development server:

    python manage.py runserver

    This will typically start the server at http://127.0.0.1:8000/. Access the API documentation at the root path for detailed usage instructions.

API Documentation

Detailed API documentation is available at http://127.0.0.1:8000/ when the development server is running. It provides comprehensive information about endpoints, request methods, parameters, responses, and authentication requirements.

jaitaw's People

Contributors

kimkorngmao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.