Skip to content

5ujan/KrezonaTask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Certainly! Here's a structured documentation outline based on your project's folder structure and description:


Project Documentation

Overview

This project is a Django REST Framework application with integrated WebSocket communication using Channels. It allows users to communicate via chat, send GIFs (after purchase), and includes an admin interface for managing GIF uploads. Payment processing is handled via Stripe. The frontend is developed using React, and the database used is MongoDB.

Folder Structure

├── backend
│   ├── accounts            # Django app for user accounts management
│   ├── backend             # Core Django project settings
│   ├── chat                # Django app for WebSocket chat functionality
│   ├── images              # Django app for managing GIF images
│   ├── manage.py           # Django's command-line utility for administrative tasks
│   ├── mystripe            # Django app for integrating with Stripe payment gateway
│   └── requirements.txt    # List of Python dependencies
└── chat-frontend
    ├── index.html          # Main HTML file for the React frontend
    ├── package.json        # Node.js package configuration
    ├── package-lock.json   # Lock file for Node.js packages
    ├── postcss.config.js   # Configuration file for PostCSS
    ├── public              # Static assets directory
    │   └── vite.svg        # Example static file
    ├── README.md           # Readme file for the React frontend
    ├── src                 # Source directory for React components and pages
    │   ├── App.jsx         # Main React application component
    │   ├── assets          # Assets directory (e.g., images, icons)
    │   ├── components      # Reusable React components
    │   ├── index.css       # Global CSS styles
    │   ├── main.jsx        # Entry point for React application
    │   └── pages           # React components representing pages/views
    ├── tailwind.config.js  # Configuration file for Tailwind CSS
    └── vite.config.js      # Configuration file for Vite.js bundler

Backend (Django)

Project Setup

The Django backend (backend) includes several apps (accounts, chat, images, mystripe) and core project settings (backend).

  • Setup Instructions:
    • Clone the repository and navigate to the backend directory.
    • Install Python dependencies using pip install -r requirements.txt.
    • Set up MongoDB connection in backend/settings.py.
    • Apply migrations with python manage.py migrate.
    • Start the Django development server with python manage.py runserver.

Apps Overview

  • Accounts (backend/accounts/):

    • Manages user authentication and profile information.
    • Includes models for user management (models.py), views (views.py), and URLs (urls.py).
  • Chat (backend/chat/):

    • Implements WebSocket communication using Django Channels.
    • Includes consumers (consumers.py) for handling WebSocket connections, serializers (serializers.py), and routing (routing.py).
  • Images (backend/images/):

    • Handles storage and management of GIF images.
    • Includes models for image data (models.py), serializers (serializers.py), and views (views.py).
  • Stripe Integration (backend/mystripe/):

    • Integrates Stripe for payment processing.
    • Includes views (views.py) for handling payment requests.

Frontend (React)

Project Setup

The React frontend (chat-frontend) is a single-page application for interacting with the Django backend.

  • Setup Instructions:
    • Navigate to chat-frontend directory.
    • Install Node.js dependencies using npm install.
    • Start the development server with npm run dev.

Directory Structure

  • src/ Directory:

    • Components: Reusable React components (components/).
    • Pages: Individual React components representing different pages (pages/).
    • Assets: Static assets such as images, icons (assets/).
  • Configuration Files:

    • tailwind.config.js: Configuration file for Tailwind CSS.
    • vite.config.js: Configuration file for Vite.js bundler.

Features

  • Chat Functionality:

    • Real-time communication using WebSocket (Channels).
    • Allows users to send messages and receive instant updates.
  • GIF Management:

    • Users can purchase GIFs from an admin-uploaded collection.
    • Admin can upload new GIFs via Django admin interface.
  • Payment Processing:

    • Integration with Stripe for handling payment transactions securely.
    • Users can make purchases to unlock GIF sending capabilities.

Usage

  • User Authentication:

    • Users register and log in to access chat and GIF functionalities.
    • Admin users manage GIF uploads and view transaction history via Django admin.
  • Deployment:

    • Deploy the Django backend and React frontend separately or together using platforms like Heroku, AWS, or Docker.

Conclusion

This documentation provides an overview of the project structure, setup instructions, key features, and usage guidelines for both backend and frontend components. It aims to assist developers in understanding and contributing to the project effectively.

---Certainly! Here's a structured documentation outline based on your project's folder structure and description:


Project Documentation

Overview

This project is a Django REST Framework application with integrated WebSocket communication using Channels. It allows users to communicate via chat, send GIFs (after purchase), and includes an admin interface for managing GIF uploads. Payment processing is handled via Stripe. The frontend is developed using React, and the database used is MongoDB.

Folder Structure

├── backend
│   ├── accounts            # Django app for user accounts management
│   ├── backend             # Core Django project settings
│   ├── chat                # Django app for WebSocket chat functionality
│   ├── images              # Django app for managing GIF images
│   ├── manage.py           # Django's command-line utility for administrative tasks
│   ├── mystripe            # Django app for integrating with Stripe payment gateway
│   └── requirements.txt    # List of Python dependencies
└── chat-frontend
    ├── index.html          # Main HTML file for the React frontend
    ├── package.json        # Node.js package configuration
    ├── package-lock.json   # Lock file for Node.js packages
    ├── postcss.config.js   # Configuration file for PostCSS
    ├── public              # Static assets directory
    │   └── vite.svg        # Example static file
    ├── README.md           # Readme file for the React frontend
    ├── src                 # Source directory for React components and pages
    │   ├── App.jsx         # Main React application component
    │   ├── assets          # Assets directory (e.g., images, icons)
    │   ├── components      # Reusable React components
    │   ├── index.css       # Global CSS styles
    │   ├── main.jsx        # Entry point for React application
    │   └── pages           # React components representing pages/views
    ├── tailwind.config.js  # Configuration file for Tailwind CSS
    └── vite.config.js      # Configuration file for Vite.js bundler

Backend (Django)

Project Setup

The Django backend (backend) includes several apps (accounts, chat, images, mystripe) and core project settings (backend).

  • Setup Instructions:
    • Clone the repository and navigate to the backend directory.
    • Install Python dependencies using pip install -r requirements.txt.
    • Set up MongoDB connection in backend/settings.py.
    • Apply migrations with python manage.py migrate.
    • Start the Django development server with python manage.py runserver.

Apps Overview

  • Accounts (backend/accounts/):

    • Manages user authentication and profile information.
    • Includes models for user management (models.py), views (views.py), and URLs (urls.py).
  • Chat (backend/chat/):

    • Implements WebSocket communication using Django Channels.
    • Includes consumers (consumers.py) for handling WebSocket connections, serializers (serializers.py), and routing (routing.py).
  • Images (backend/images/):

    • Handles storage and management of GIF images.
    • Includes models for image data (models.py), serializers (serializers.py), and views (views.py).
  • Stripe Integration (backend/mystripe/):

    • Integrates Stripe for payment processing.
    • Includes views (views.py) for handling payment requests.

Frontend (React)

Project Setup

The React frontend (chat-frontend) is a single-page application for interacting with the Django backend.

  • Setup Instructions:
    • Navigate to chat-frontend directory.
    • Install Node.js dependencies using npm install.
    • Start the development server with npm run dev.

Directory Structure

  • src/ Directory:

    • Components: Reusable React components (components/).
    • Pages: Individual React components representing different pages (pages/).
    • Assets: Static assets such as images, icons (assets/).
  • Configuration Files:

    • tailwind.config.js: Configuration file for Tailwind CSS.
    • vite.config.js: Configuration file for Vite.js bundler.

Features

  • Chat Functionality:

    • Real-time communication using WebSocket (Channels).
    • Allows users to send messages and receive instant updates.
  • GIF Management:

    • Users can purchase GIFs from an admin-uploaded collection.
    • Admin can upload new GIFs via Django admin interface.
  • Payment Processing:

    • Integration with Stripe for handling payment transactions securely.
    • Users can make purchases to unlock GIF sending capabilities.

Usage

  • User Authentication:

    • Users register and log in to access chat and GIF functionalities.
    • Admin users manage GIF uploads and view transaction history via Django admin.
  • Deployment:

    • Deploy the Django backend and React frontend separately or together using platforms like Heroku, AWS, or Docker.

Conclusion

This documentation provides an overview of the project structure, setup instructions, key features, and usage guidelines for both backend and frontend components. It aims to assist developers in understanding and contributing to the project effectively.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages