mBuergi86 / DevSeConnect

DevSeConnect: A scalable social media platform for DevOps and software developers, designed to foster collaboration, knowledge sharing, and project management.
GNU General Public License v3.0
0 stars 0 forks source link

DevSeConnect 🌐

Welcome to DevSeConnect – A social media platform for developers to share knowledge and collaborate on DevOps and software development topics.

Project Overview πŸ› οΈ

This repository contains the backend and frontend implementation of DevSeConnect, built using Go (Golang) and Svelte. The project utilizes several modern technologies including RabbitMQ, PostgreSQL, Redis, Svelte and Docker to provide a scalable and performant architecture.

Folder Structure πŸ“

β”œβ”€β”€ cmd
β”‚Β Β  β”œβ”€β”€ main.go      # Main entry point of the application           
β”œβ”€β”€ internal
β”‚Β Β  β”œβ”€β”€ application
β”‚Β Β  β”‚Β Β  └── service
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ comment_service.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ like_service.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ message_service.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ post_service.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ post_tags_service.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ tags_service.go
β”‚Β Β  β”‚Β Β      └── user_service.go
β”‚Β Β  β”œβ”€β”€ domain
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ entity
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ comments.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ likes.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ messages.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ network.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ posts.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ posttags.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ tags.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ user_connections.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── users.go
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ handler
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ comment_handler.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ like_handler.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ message_handler.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post_handler.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post_tags_handler.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ tag_handler.go
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── user_handler.go
β”‚Β Β  β”‚Β Β  └── repository
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ comment_repository.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ likes_repository.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ message_repository.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ post_repository.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ post_tags_repository.go
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ tags_repository.go
β”‚Β Β  β”‚Β Β      └── user_repository.go
β”‚Β Β  └── infrastructure
β”‚Β Β      β”œβ”€β”€ cache
β”‚Β Β      β”‚Β Β  └── redis.go
β”‚Β Β      β”œβ”€β”€ database
β”‚Β Β      β”‚Β Β  └── postgres.go
β”‚Β Β      β”œβ”€β”€ messaging
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ comment_consumer.go
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ consumer.go
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ like_consumer.go
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ message_consumer.go
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ post_consumer.go
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ post_tags_consumer.go
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ producer.go
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ rabbitmq.go
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ tags_consumer.go
β”‚Β Β      β”‚Β Β  └── user_consumer.go
β”‚Β Β      └── routing
β”‚Β Β          └── router.go
β”œβ”€β”€ pkg
β”‚Β Β  β”œβ”€β”€ response
β”‚Β Β  β”‚Β Β  └── error.go
β”‚Β Β  └── security
β”‚Β Β      └── hash.go
β”œβ”€β”€ scripts
β”‚Β Β  β”œβ”€β”€ migrate.sh
β”‚Β Β  └── migrations
β”‚Β Β      β”œβ”€β”€ devseconnect_insert.sql
β”‚Β Β      β”œβ”€β”€ devseconnect.sql
β”‚Β Β      β”œβ”€β”€ devseconnect_test_select2.sql
β”‚Β Β      └── devseconnect_test_select.sql
β”œβ”€β”€ .gitignore                     # Git ignore rules
β”œβ”€β”€ docker-compose.yml             # Docker Compose setup
β”œβ”€β”€ Dockerfile                     # Dockerfile for containerization
β”œβ”€β”€ nginx.conf
β”œβ”€β”€ nohup.out
β”œβ”€β”€ go.mod                         # Go module dependencies
β”œβ”€β”€ prometheus.yml
β”œβ”€β”€ LICENSE                        # License file

Technologies Used πŸ› οΈ

Installation πŸš€

Prerequisites

Make sure you have the following installed:

Steps to Install

  1. Clone the repository:

    git clone https://github.com/mBuergi86/devseconnect.git
    cd devseconnect
  2. Install dependencies:

    go mod download
  3. Run with Docker:

    docker-compose up -d --build
  4. Run locally (without Docker):

    go run cmd/main.go
  5. Log Webserver:

    docker logs -f golang_web_server

API Endpoints πŸ”—

The platform uses RESTful APIs to handle different operations:

Database Schema πŸ—„οΈ

The database is managed using PostgreSQL, and migration scripts are located in scripts/migrations/. The key tables include:

Messaging System βœ‰οΈ

Asynchronous communication between services is managed via RabbitMQ. Producers and consumers are defined in the internal/infrastructure/messaging/ directory.

Monitoring πŸ“Š

Prometheus is used for application monitoring and metrics collection. The configuration is located in prometheus.yml.

License πŸ“œ

This project is licensed under the MIT License.