Synesthesia is a modern dating application built with Rails 7 and React/TypeScript, featuring real-time messaging, location-based matching, and a responsive design.
- Features
- Tech Stack
- Development Environment
- Setup
- Available Scripts
- API Endpoints
- Testing
- Deployment
- 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
- 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
- React 18+: UI framework
- TypeScript: Type safety
- Redux Toolkit: State management
- TailwindCSS: Styling
- Framer Motion: Animations
Synesthesia offers multiple ways to run the development environment:
bin/dev
This starts all services:
- Rails server
- PostgreSQL (if not already running)
- Redis
- Sidekiq
- Asset compilation (CSS/JS)
bin/dev-simple
This starts only the essential services:
- Rails server
- Redis
bin/test-environment
Sets up a minimal environment for running tests:
- Rails server in test mode
- Redis
- Prepares test database
- Ruby 3.2.0+
- Node.js 16+
- PostgreSQL 13+
- Redis 6+
- Yarn or npm
-
Clone the repository
git clone https://github.com/yourusername/synesthesia.git cd synesthesia
-
Install dependencies
bundle install yarn install
-
Set up the database
bin/rails db:setup
-
Configure environment variables
- Copy the
.env.example
file to.env
- Update the values as needed
cp .env.example .env
- Copy the
-
Start the development server
bin/dev
-
Access the application Open http://localhost:3000 in your browser
bin/dev
: Start all services for developmentbin/dev-simple
: Start minimal services (Rails + Redis)bin/test-environment
: Set up environment for testingbin/rails
: Run Rails commandsbundle exec rspec
: Run the test suiteyarn dev
: Start JS/CSS asset compilationyarn build
: Build production assetsyarn test
: Run JavaScript tests
POST /api/v1/auth/register
: Register a new userPOST /api/v1/auth/login
: Log in and receive JWTDELETE /api/v1/auth/logout
: Log out and invalidate JWT
GET /api/v1/users/:id
: Get user profilePATCH /api/v1/users/:id
: Update user profile
GET /api/v1/matches
: List all matchesGET /api/v1/matches/:id
: Get specific matchGET /api/v1/matches/potential
: Get potential matchesPOST /api/v1/matches/:id/swipe
: Swipe on a potential match
GET /api/v1/matches/:match_id/messages
: Get messages for a matchPOST /api/v1/matches/:match_id/messages
: Send message
POST /api/v1/images
: Upload image (avatar or gallery)
GET /api/v1/notifications
: Get user notificationsPOST /api/v1/notifications/:id/mark_as_read
: Mark notification as read
bundle exec rspec
COVERAGE=true bundle exec rspec
Detailed instructions for deploying to production environments can be found in DEPLOYMENT.md.
The application uses environment variables for configuration. See .env.example for required variables.
This project is licensed under the MIT License - see the LICENSE file for details.