Giter Site home page Giter Site logo

droncogene / popchat Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 391 KB

A chat application for fast messaging using websockets and fastapi

Home Page: https://popchat.droncogene.com

Python 42.92% HTML 0.62% JavaScript 0.73% Svelte 30.60% CSS 1.71% TypeScript 21.18% Dockerfile 0.50% Shell 1.75%
docker docker-compose fastapi javascript python3 socketio typescript fabric3 sveltekit

popchat's Introduction

PopChat - The Chat App

Popchat is a real time web-based chat application built with websockets (ws)

  • users are available generally, any user can search any other user by their username
  • users can chat one on one and also in rooms
  • any user can create and add any other user to a room, however, users can block being added to rooms
  • there is message persistence on the backend (this will change later)
  • more features to come

Technologies

  • Frontend: - Svelte - SocketIO client - TypeScript
    • TailwindCSS
       
  • Backend:
    • Python3.11
    • FastAPI
    • Python-socketio
    • JWT authentication (fastapi_jwt_auth)
    • Database: MongoDB
    • ODM: BeanieODM
    • Cache: Redis
    • Docker
    • Web Server: NginX
    • Application Server: Uvicorn
    • Queue: RabbitMQ

Running the app

Ensure python3.11 is installed
To run the app, open the root directory of the project

  1. Without docker compose. Get MongoDB, Redis, and RabbitMQ running locally or with docker on their default port. For docker:
  • install docker: docker docs
  • run the mongodb container: docker run -p 27017:27017 --name mongodb mongo:latest
  • run the redis container: docker run -p 6379:6379 --name redisdb redis:latest
  • run the rabbitmq container: docker run -p 5672:5672 --name rabbitmq rabbitmq:latest  
  1. Run the client server:
  • cd client
  • npm install
  • npm run dev
     
  1. In another terminal window, run the backend server:
  • cd server
  • Create .env file in the backend directory and add the following environment variables (DB_* env variables can be omitted if mongodb is running on the default settings and does not need authentication):
    • SECRET_KEY={ value } (set value to a secret key of your choosing)
    • MODE={ dev | prod | test }
  • poetry install
  • poetry shell
  • python3 main.py
    NOTE: check .env.sample or app/settings/__init__.py for all available environment variables
       
  1. Run the backend WITH docker compose:
  • Ensure docker is installed
  • cd server
  • Ensure a .env file is created in the server directory with the required environment variables
  • docker compose up

ENJOY!

popchat's People

Contributors

droncogene avatar roncollins-mm 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.