Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Semaphore monorepo containing all our source code - the client apps (iOS / Android), and the server that powers them.

License

Notifications You must be signed in to change notification settings

araaavind/semaphore

Repository files navigation

Semaphore

Semaphore Logo

A modern, feature-rich RSS reader with cross-platform support

License: MIT Go Version Flutter Version

πŸ“– Overview

Semaphore is a full-featured RSS reader application designed for modern content consumption. It consists of a cross-platform mobile application built with Flutter and a robust backend API server written in Go. The project emphasizes clean architecture, scalability, and user experience.

✨ Key Features

  • πŸ“± Cross-platform mobile app - Native iOS and Android applications built with Flutter
  • πŸ” User authentication - Secure email/username login with Google Sign-In integration
  • πŸ“° RSS/Atom feed management - Subscribe to and organize your favorite content sources
  • 🎯 Topic-based organization - Curated topics and categories for content discovery
  • πŸ“š Content walls - Create custom collections of feeds for focused reading
  • πŸ’Ύ Save articles - Save articles for later
  • ❀️ Social features - Like and share articles
  • πŸ” Advanced search - Full-text search across feeds
  • πŸ“Š Analytics integration - Firebase Analytics and Crashlytics support
  • 🎨 Adaptive theming - Light and dark mode support
  • πŸ“° Popular sources - Easily follow subreddits, medium publications, substacks, youtube channels etc.

πŸ“Έ Screenshots

Home Screen Feed View Article Reader User Profile
Settings Walls Search

πŸ—οΈ Architecture

Semaphore follows a clean architecture pattern with clear separation of concerns:

Backend (Go)

server/
β”œβ”€β”€ cmd/api/             # Application entry point and HTTP handlers
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ data/            # Database models and queries
β”‚   β”œβ”€β”€ cache/           # Redis caching layer
β”‚   β”œβ”€β”€ mailer/          # Email service
β”‚   └── validator/       # Input validation
β”œβ”€β”€ migrations/          # Database schema migrations
└── vendor/              # Vendored dependencies

Tech Stack:

  • Language: Go 1.23+
  • Database: PostgreSQL with pgx driver
  • Cache: Redis
  • HTTP Router: httprouter
  • RSS Parsing: gofeed
  • Migrations: Goose

Mobile App (Flutter)

app/lib/
β”œβ”€β”€ features/           # Feature-based modules
β”‚   β”œβ”€β”€ auth/           # Authentication
β”‚   β”œβ”€β”€ feed/           # RSS feed management
β”‚   β”œβ”€β”€ home/           # Main navigation
β”‚   └── profile/        # User profile
β”œβ”€β”€ core/               # Shared components
β”‚   β”œβ”€β”€ router/         # Navigation (go_router)
β”‚   β”œβ”€β”€ theme/          # UI theming
β”‚   └── common/         # Shared widgets and utilities
└── packages/smphr_sdk/ # Custom SDK for Auth and request interceptors

Tech Stack:

  • Framework: Flutter 3.4.3+
  • State Management: flutter_bloc
  • Navigation: go_router
  • HTTP Client: dio
  • Local Storage: Hive + shared_preferences
  • UI: Material Design with adaptive theming

SDK Package

The smphr_sdk provides a clean interface between the Flutter app and Go backend:

  • Authentication management with automatic token refresh
  • Session persistence across app restarts
  • Standardized error handling
  • Network connectivity monitoring

πŸš€ Getting Started

Prerequisites

Environment Setup

  1. Clone the repository:

    git clone https://github.com/araaavind/semaphore.git
    cd semaphore
  2. Set up environment variables: Create a .envrc file in the project root:

    export SEMAPHORE_DSN="postgres://username:password@localhost/semaphore?sslmode=disable"
    export SMTP_USERNAME="test-smtp-username"
    export SMTP_PASSWORD="test-smtp-password"
    export PROD_IP="production-server-ip"

Quick Start with Docker

The easiest way to get started is using Docker Compose for the database services:

# Start PostgreSQL and Redis services
docker-compose up -d

# The services will be available at:
# - PostgreSQL: localhost:5432 (dev-db)
# - PostgreSQL Test: localhost:5433 (test-db)  
# - Redis: localhost:6379

Backend Setup

  1. Navigate to the server directory:

    cd server
  2. Install Go dependencies:

    go mod download
  3. Set up the database:

    # Install goose migration tool
    go install github.com/pressly/goose/v3/cmd/goose@latest
    
    # Run database migrations
    make db/migrations/up
  4. Start the API server:

    make run/api

    The API server will be available at http://localhost:4000

Mobile App Setup

  1. Navigate to the app directory:

    cd app
  2. Install Flutter dependencies:

    flutter pub get
  3. Configure Firebase (optional):

    • Add your google-services.json (Android) and GoogleService-Info.plist (iOS)
    • Update Firebase configuration in lib/firebase_options.dart
  4. Update server configuration:

    // In lib/core/constants/server_constants.dart
    static const String baseUrl = 'http://localhost:4000/v1';
  5. Run the app:

    # For development
    flutter run
    
    # Or build for specific platforms
    flutter build apk          # Android
    flutter build ios          # iOS

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Setting up your development environment
  • Code style and standards
  • Submitting pull requests
  • Reporting issues

πŸ“„ License

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

πŸ™ Acknowledgments

πŸ“ž Support


About

Semaphore monorepo containing all our source code - the client apps (iOS / Android), and the server that powers them.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published