Skip to content

gregorburgess/synesthesia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synesthesia

Synesthesia is a modern dating application built with Rails 7 and React/TypeScript, featuring real-time messaging, location-based matching, and a responsive design.

Table of Contents

Features

  • User Authentication: Secure JWT-based authentication
  • Profile Management: User profiles with images, bio, and preferences
  • Match System: Swipe-based matching with mutual match detection
  • Real-time Messaging: Instant communication via WebSockets
  • Image Uploads: Cloud storage with Cloudinary
  • Location Services: Distance-based matching
  • Offline Support: Progressive Web App capabilities
  • Responsive Design: Mobile-first approach

Tech Stack

Backend

  • Ruby on Rails 7: API and application server
  • PostgreSQL: Primary database
  • Redis: WebSocket backend and caching
  • Sidekiq: Background job processing
  • Action Cable: WebSocket communication
  • Cloudinary: Image storage and transformation

Frontend

  • React 18+: UI framework
  • TypeScript: Type safety
  • Redux Toolkit: State management
  • TailwindCSS: Styling
  • Framer Motion: Animations

Development Environment

Synesthesia offers multiple ways to run the development environment:

Standard Development (All Services)

bin/dev

This starts all services:

  • Rails server
  • PostgreSQL (if not already running)
  • Redis
  • Sidekiq
  • Asset compilation (CSS/JS)

Simplified Development (Core Only)

bin/dev-simple

This starts only the essential services:

  • Rails server
  • Redis

Test Environment

bin/test-environment

Sets up a minimal environment for running tests:

  • Rails server in test mode
  • Redis
  • Prepares test database

Setup

Prerequisites

  • Ruby 3.2.0+
  • Node.js 16+
  • PostgreSQL 13+
  • Redis 6+
  • Yarn or npm

Initial Setup

  1. Clone the repository

    git clone https://github.com/yourusername/synesthesia.git
    cd synesthesia
    
  2. Install dependencies

    bundle install
    yarn install
    
  3. Set up the database

    bin/rails db:setup
    
  4. Configure environment variables

    • Copy the .env.example file to .env
    • Update the values as needed
    cp .env.example .env
    
  5. Start the development server

    bin/dev
    
  6. Access the application Open http://localhost:3000 in your browser

Available Scripts

  • bin/dev: Start all services for development
  • bin/dev-simple: Start minimal services (Rails + Redis)
  • bin/test-environment: Set up environment for testing
  • bin/rails: Run Rails commands
  • bundle exec rspec: Run the test suite
  • yarn dev: Start JS/CSS asset compilation
  • yarn build: Build production assets
  • yarn test: Run JavaScript tests

API Endpoints

Authentication

  • POST /api/v1/auth/register: Register a new user
  • POST /api/v1/auth/login: Log in and receive JWT
  • DELETE /api/v1/auth/logout: Log out and invalidate JWT

Users

  • GET /api/v1/users/:id: Get user profile
  • PATCH /api/v1/users/:id: Update user profile

Matches

  • GET /api/v1/matches: List all matches
  • GET /api/v1/matches/:id: Get specific match
  • GET /api/v1/matches/potential: Get potential matches
  • POST /api/v1/matches/:id/swipe: Swipe on a potential match

Messages

  • GET /api/v1/matches/:match_id/messages: Get messages for a match
  • POST /api/v1/matches/:match_id/messages: Send message

Images

  • POST /api/v1/images: Upload image (avatar or gallery)

Notifications

  • GET /api/v1/notifications: Get user notifications
  • POST /api/v1/notifications/:id/mark_as_read: Mark notification as read

Testing

Running Tests

bundle exec rspec

Test Coverage

COVERAGE=true bundle exec rspec

Deployment

Production Setup

Detailed instructions for deploying to production environments can be found in DEPLOYMENT.md.

Environment Configuration

The application uses environment variables for configuration. See .env.example for required variables.

License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published