goread2

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 12 Imported by: 0

README ΒΆ

GoRead2 - Multi-User RSS Reader

Tests Go Version Go Report Card

A modern, multi-user RSS reader inspired by Google Reader, built with Go and featuring Google OAuth authentication, a clean three-pane interface, and comprehensive user data isolation.

✨ Features

  • Multi-user support with Google OAuth authentication
  • Three-pane layout (feeds β†’ articles β†’ content) like Google Reader
  • RSS/Atom feed support with OPML import and export capabilities
  • Smart article import with configurable limits to prevent overload
  • Smart feed updates with background polling every hour and intelligent prioritization
  • Per-user article management (read/unread, starred status)
  • Subscription system with 30-day free trial and Stripe integration
  • Keyboard shortcuts for efficient navigation
  • Reading optimization with clean, sans-serif typography
  • Self-hosted - runs locally or deploys to cloud platforms
  • Cost-optimized with intelligent caching and query optimization

πŸš€ Quick Start

Prerequisites
  • Go 1.23+
  • Google Cloud Project (for OAuth)
  • Stripe Account (optional, for subscriptions)
1. Clone and Setup
git clone https://github.com/jeffreyp/goread2.git
cd goread2
go mod tidy
2. Google OAuth Setup
  1. Create a Google Cloud Project at console.cloud.google.com
  2. Enable APIs & Services β†’ Credentials β†’ Create OAuth 2.0 Client ID
  3. Set authorized redirect URI: http://localhost:8080/auth/callback
  4. Export your credentials:
export GOOGLE_CLIENT_ID="your-client-id"
export GOOGLE_CLIENT_SECRET="your-client-secret"
export GOOGLE_REDIRECT_URL="http://localhost:8080/auth/callback"
3. Build Frontend Assets (Optional)

For production deployments, build minified frontend assets:

# Install npm dependencies
npm install

# Build all frontend assets (JS + CSS)
make build-frontend

# Or build individually
make build-js    # Build minified JavaScript
make build-css   # Build minified CSS
4. Run the Application
go run main.go
# Or use make for development with config validation
make dev

Access at http://localhost:8080 and sign in with Google!

πŸ”§ Build System

The project includes a comprehensive Makefile with the following targets:

make help              # Show all available commands
make build             # Build the Go application binary
make build-frontend    # Build minified JS and CSS assets
make test              # Run all tests
make validate-build    # Validate config + build frontend + build app
make deploy-dev        # Deploy to development environment
make deploy-prod       # Deploy to production environment
make clean             # Remove all build artifacts

πŸ“š Documentation

Guide Purpose
Features Guide Complete feature overview and usage tips
Setup Guide Complete installation and configuration
Authentication Guide OAuth flow, session management, and security
Deployment Guide Production deployment options (includes Google Secret Manager setup)
Admin Guide User management and admin commands
Stripe Setup Payment processing configuration
Testing Guide Running and writing tests
API Reference API endpoints and usage
Feature Flags Configuration and feature toggles
Security Guide Security features and best practices
Performance & Cost Optimization strategies and cost savings
Monitoring Cloud Monitoring dashboards and cost tracking
Caching Strategy HTTP and application-level caching
Troubleshooting Common issues and solutions
Contributing Development and contribution guide

πŸ—οΈ Architecture

  • Authentication: Google OAuth 2.0 with secure session management
  • Database: SQLite (local) or Google Cloud Datastore (production)
  • Frontend: Vanilla JavaScript with clean three-pane interface
  • Backend: Go with Gin framework
  • Payments: Stripe integration for subscriptions

πŸ–ΌοΈ Interface

The interface features three main sections:

  • Left pane: Personal feed subscriptions with unread counts
  • Center pane: Article list with personal read/unread status
  • Right pane: Full article content with original formatting

⌨️ Keyboard Shortcuts

  • j/k - Navigate articles up/down
  • o/Enter - Open article in new tab
  • m - Toggle read/unread status
  • s - Star/unstar article
  • r - Refresh all feeds

πŸ”’ Security & Privacy

  • Complete user data isolation - users only see their own feeds and article status
  • Secure authentication via Google OAuth (no password storage)
  • Session security with HTTP-only cookies and CSRF protection
  • Input validation and XSS protection throughout

πŸ§ͺ Testing

Run the comprehensive test suite:

make test  # Runs both backend and frontend tests
  • Comprehensive test coverage with significant improvements in critical areas
  • Admin security testing for the new database-based token authentication system
  • Multi-user isolation testing to ensure data security
  • Integration tests for API endpoints, authentication, and admin functionality
  • Dual database support testing (SQLite + Google Datastore)
  • Frontend tests with Jest and jsdom

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure make test passes
  5. Submit a pull request

See docs/CONTRIBUTING.md for detailed guidelines.

πŸ“„ License

This project is licensed under the MIT License.


Need help? Check the Setup Guide for detailed instructions or the Troubleshooting section for common issues.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
cmd
admin command
setup-stripe command
internal
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL