Skip to content

Latest commit

 

History

History
173 lines (136 loc) · 5.62 KB

File metadata and controls

173 lines (136 loc) · 5.62 KB

LeftPlot Public Repository

This is the public version of the LeftPlot backend application, designed for open-source sharing and community contribution.

🎯 Purpose

This repository serves as a stripped-down, sanitized version of the production LeftPlot application, suitable for:

  • Portfolio showcase - Demonstrating technical skills
  • Open-source contribution - Community development
  • Learning resource - Educational purposes
  • Code review - Public feedback and improvement

📋 What's Included

✅ Core Features

  • Complete backend architecture - Node.js/Express/PostgreSQL/Redis
  • Authentication system - JWT-based auth with role management
  • Post management - CRUD operations with voting
  • Comment system - Threaded discussions
  • Polling system - Interactive polls on posts
  • Share functionality - URL-friendly slugs for sharing
  • Admin panel - Content moderation tools
  • API documentation - Comprehensive endpoint docs
  • Testing suite - Unit and integration tests
  • Docker setup - Containerization configuration

✅ Documentation

  • README.md - Comprehensive project overview
  • API_DOCUMENTATION.md - Detailed API reference
  • POLLING_API_DOCUMENTATION.md - Polling system guide
  • SHARE_FUNCTIONALITY_GUIDE.md - Share feature implementation
  • COMMENTS_IMPLEMENTATION_GUIDE.md - Comment system guide
  • REDIS_SETUP.md - Caching configuration
  • CONTRIBUTING.md - Contribution guidelines

✅ Configuration Files

  • package.json - Dependencies and scripts
  • docker-compose.yml - Multi-service setup
  • Dockerfile - Container configuration
  • env.example - Environment variables template
  • .gitignore - Version control exclusions

🚫 What's Excluded

❌ Sensitive Information

  • Production secrets - API keys, passwords, tokens
  • Database credentials - Real connection strings
  • Environment variables - Actual .env files
  • Log files - Application logs
  • Node modules - Dependencies (install via npm)

❌ Production Data

  • Real user data - Actual user accounts
  • Production database - Live data
  • Analytics data - User behavior tracking
  • Backup files - Database backups

❌ Internal Documentation

  • Internal APIs - Private endpoints
  • Deployment scripts - Production deployment
  • Monitoring configs - Internal monitoring
  • Security policies - Internal security docs

🔧 Setup Instructions

Quick Start

# Clone the repository
git clone https://github.com/yourusername/leftplot-backend.git
cd leftplot-backend

# Install dependencies
npm install

# Set up environment
cp env.example .env
# Edit .env with your configuration

# Set up database
createdb leftplot_db
psql -d leftplot_db -f db/schema.sql
psql -d leftplot_db -f megaseed.sql

# Start development server
npm run dev

Docker Setup

# Build and run with Docker Compose
docker-compose up --build

🎯 Use Cases

For Developers

  • Learn modern backend development - Full-stack Node.js application
  • Study API design - RESTful endpoints with proper documentation
  • Understand database design - PostgreSQL schema with relationships
  • Explore caching strategies - Redis implementation
  • Practice testing - Comprehensive test suite

For Employers

  • Portfolio demonstration - Professional-grade application
  • Code quality assessment - Clean, well-documented code
  • Architecture understanding - Scalable design patterns
  • Technical skills showcase - Modern tech stack implementation

For Contributors

  • Open-source contribution - Community-driven development
  • Feature development - Add new functionality
  • Bug fixes - Improve existing code
  • Documentation - Enhance project docs

🔒 Security Considerations

What's Safe to Share

  • Code structure - Application architecture
  • API design - Endpoint patterns
  • Database schema - Table relationships
  • Configuration examples - Template files

What's Protected

  • Real credentials - Production secrets
  • User data - Personal information
  • Internal systems - Private infrastructure
  • Business logic - Proprietary algorithms

📊 Repository Statistics

  • Lines of Code: ~15,000+
  • API Endpoints: 25+
  • Database Tables: 10+
  • Test Coverage: 80%+
  • Documentation: Comprehensive
  • Dependencies: Modern stack

🌟 Key Features Highlighted

Technical Excellence

  • Modern Architecture - Microservices-ready design
  • Security First - JWT auth, input validation, rate limiting
  • Performance Optimized - Redis caching, database indexing
  • Scalable Design - Containerized, cloud-ready
  • Well Tested - Comprehensive test coverage

Technology Focus

  • Modern Development - Full-stack web development
  • Best Practices - Industry-standard patterns
  • Scalable Architecture - Production-ready design
  • Community Driven - Open-source collaboration

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Areas for Contribution

  • New features - Additional functionality
  • Bug fixes - Issue resolution
  • Documentation - Improved guides
  • Testing - Enhanced test coverage
  • Performance - Optimization improvements

📞 Support

  • Issues: Create GitHub issues for bugs/features
  • Discussions: Use GitHub discussions for questions
  • Documentation: Check existing docs first
  • Community: Join our development community

This is a professional, production-ready application designed for modern web development. Built with modern technologies and best practices.