Code Monkey home page Code Monkey logo

pistagram's Introduction

Introduction

PistaGram is a real-time communication web application that allows users to add friends, chat in real-time, and manage their connections effortlessly. The application is responsive and provides a seamless user experience across different devices. Built with Node.js and JavaScript for the backend and React and TypeScript using Vite for the frontend, PistaGram leverages socket technology to enable real-time interactions.

Features

  • Real-time Communication: Chat with friends and teams in real-time using sockets.
  • User Authentication: Secure signup and login functionalities.
  • Friend Management: Discover and add friends from the discover section.
  • Responsive Design: Enjoy a seamless experience across various devices.

Architecture

  1. Server is running on port 8000(default). All the logs are send to loki logger in level basis through Loki transport layer.
  2. Loki Logger is running on port 3100.
  3. Prometheus is running on port 9090. It pulls metrics data from server every 2 seconds.
  4. Grafan is running on port 3000. It keeps on pulling metrics and logs from prometheus and loki respectively. image

Tech Stack

  • Frontend:
    • React
    • TypeScript
    • Vite
  • Backend:
    • Node.js
    • JavaScript
  • Real-time Communication:
    • Socket.io

Installation

To run PistaGram locally, follow these steps:

  • Prerequisites: Ensure you have the following installed:

    • Node.js (v20.x or higher)
    • npm (v10.x or higher)
    • docker (v26.x or higher)
  • Steps:

    • Clone the repository

      git clone https://github.com/Access-Denied-001/PistaGram.git
      cd PistaGram
      
    • Environment Variables

      PORT=8000 (default)
      ENVIRONMENT=developement or production
      MONGO_DB_USERNAME=<MONGODB_USERNAME>
      MONGO_DB_PASSWORD=<MONOGODB_PASSWORD>
      MONGO_DB_URI=<MONGODB_URI>
      JWT_SECRET_KEY=<JWT_SECRET>
      IP=<PRIVATE_IP_ADDRESS>
      
    • Docker Containers Initialization

      • Prometheus

        cd Prometheus
        

        Open the prometheuse-config.yml and change the targets according to your ip. For example, <YOUR_PRIVATE_IP>:8000

        docker compose up
        

        Output image

      • Loki

        docker run -d --name=loki -p 3100:3100 grafana/loki
        

        Output image

      • Grafana

        docker run -d -p 3000:3000 --name=grafana grafana/grafana-oss
        

        Output image

    • Run the Application

      • Development

        Backend-

        npm install
        cd Backend
        npm run dev
        

        Frontend-

        cd Frontend
        npm install
        npm run dev
        
      • Production

        npm run build
        npm run prod
        

Usage

Contributing

We welcome contributions to PistaGram! To contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add your feature').
  5. Push to the branch (git push origin feature/YourFeature).
  6. Open a pull request.

Acknowledgements

Thank you to all the contributors who have made this project possible.

pistagram's People

Contributors

access-denied-001 avatar curioushg avatar

Watchers

 avatar

Forkers

curioushg

pistagram's Issues

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.