Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

302 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

this README.md file is written by Claude Sonnet-3.7 as a placeholder, do not trust MOST of what it says, ask me first

PYCHARM IDE IS STRONGLY SUGGESTED (for contributors) FOR DOCUMENTATION AND RUNTIME SUPPORT

  • If this is an issue, please let me know and I will get you a license

STEM-HQ

A professional networking platform specifically designed for Science, Technology, Engineering, and Mathematics professionals.

Overview

STEM Network connects professionals across scientific and technical fields, facilitating collaboration, knowledge sharing, and career advancement within the STEM community. Our platform provides specialized features tailored to the unique needs of researchers, engineers, data scientists, and other technical professionals.

System Architecture

Backend Services

The backend is built using a microservices architecture, with each service contained in its own Docker container:

Service Description Technologies
Authentication API User authentication and authorization FastAPI, Pydantic, JWT
Profile API User profile management FastAPI, Pydantic
Connection API Network connections and recommendations FastAPI, Pydantic
Messaging API Direct messaging between users FastAPI, Pydantic, WebSockets
Content API Posts, articles, and publications FastAPI, Pydantic
Search API Advanced search functionality FastAPI, Pydantic, Elasticsearch
Analytics API User engagement and platform metrics FastAPI, Pydantic
Notification API User notifications and alerts FastAPI, Pydantic

Database

PostgreSQL serves as our primary database system:

  • Main Database: Stores user profiles, connections, content, and other core data
  • Analytics Database: Dedicated database for analytical data and metrics
  • Schema Management: Uses Alembic for database migrations
  • Connection Pooling: PgBouncer for efficient connection management

Frontend

The frontend is built with Vue.js, contained in its own Docker containers:

  • Main Application: Vue.js with Vuex for state management
  • Admin Dashboard: Separate Vue application for platform administration
  • Mobile-Responsive Design: Ensures optimal experience across devices

Deployment Strategy

Initial Deployment (Development & Early Production)

The platform will initially be deployed on a hybrid local cluster consisting of:

  • 1× Raspberry Pi 4 (4GB RAM)
  • 1× Raspberry Pi 3B+
  • 1× Full Tower PC
    • 32GB RAM
    • 6-core CPU
    • NVIDIA 1610 Super GPU
    • 4TB storage

Cluster Configuration

                      ┌──────────────────┐
                      │    Load Balancer │
                      │    (Nginx/HAProxy)│
                      └─────────┬────────┘
                                │
        ┌────────────┬──────────┴──────────┬────────────┐
        │            │                     │            │
┌───────▼────┐ ┌─────▼─────┐     ┌─────────▼─────────┐  │
│ Raspberry  │ │ Raspberry │     │ Full Tower PC    │  │
│ Pi 4      │ │ Pi 3B+    │     │ - Frontend       │  │
│ - API     │ │ - Database│     │ - Heavy APIs     │  │
│ Services  │ │ - Cache   │     │ - ML Services    │  │
└───────────┘ └───────────┘     └───────────────────┘  │
        │            │                     │            │
        └────────────┴─────────────────────┴────────────┘

Resource Allocation

  • Raspberry Pi 4: Hosts lighter API services and background workers
  • Raspberry Pi 3B+: Runs PostgreSQL database and Redis cache
  • Full Tower PC: Hosts resource-intensive services, frontend applications, and potential machine learning services

Future Deployment (Scale-Up)

As the platform grows, deployment will transition to Oracle Cloud Infrastructure (OCI):

  • Migration Strategy: Gradual migration of services to ensure minimal downtime
  • Containerization: All services will remain in Docker containers for smooth transition
  • Orchestration: Kubernetes for container orchestration and scaling
  • Database: Managed PostgreSQL service for improved reliability and performance

Development Environment

Prerequisites

  • Docker and Docker Compose
  • Python 3.9+
  • Node.js 14+
  • PostgreSQL 13+

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/your-organization/stem-network.git
    cd stem-network
  2. Set up environment variables:

    cp .env.example .env
    # Edit .env with your configuration
  3. Start the development environment:

    docker-compose up -d
  4. Access the development server:

    Frontend: http://localhost:8080
    API Documentation: http://localhost:8000/docs
    

CI/CD Pipeline

  • Git Workflow: Feature branches with pull requests to main
  • Automated Testing: Unit and integration tests run on each PR
  • Deployment: Automatic deployment to development environment after successful merge
  • Production Deployment: Manual approval required for production deployment

API Documentation

API documentation is automatically generated using FastAPI's built-in Swagger UI:

Database Schema

The core database schema includes the following main tables:

  • Users
  • Profiles
  • Connections
  • Skills
  • Endorsements
  • Posts
  • Comments
  • Messages
  • Notifications
  • Publications
  • Projects

Monitoring and Logging

  • Application Monitoring: Prometheus and Grafana
  • Log Management: ELK Stack (Elasticsearch, Logstash, Kibana)
  • Error Tracking: Sentry
  • Performance Monitoring: New Relic

Security Considerations

  • Authentication: JWT with refresh tokens
  • Authorization: Role-based access control
  • Data Encryption: TLS for all communications
  • Database Security: Parameterized queries, least privilege access
  • Input Validation: Pydantic models for request validation
  • Rate Limiting: Implemented at API gateway level

Backup and Recovery

  • Database Backups: Daily automated backups
  • Disaster Recovery Plan: Regular testing of restore procedures
  • Data Retention Policy: Compliant with relevant regulations

Future Roadmap

  • Machine Learning Integration: Recommendation engine for connections and content
  • Research Paper Integration: Direct connection to academic paper repositories
  • Project Collaboration Tools: Specialized tools for STEM project collaboration
  • Virtual Event Platform: Host and attend virtual conferences and meetups
  • Learning Resources: Curated learning paths for different STEM disciplines

Contributing

See CONTRIBUTING.md for guidelines on how to contribute to this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

LinkedIn for people in STEM - basically just turned into NetworkPro where I work now

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages