SeatSync is a receipt tracking application that allows users to upload receipt images, automatically extract meal information (date, time, and food items), and view their expense history on a dashboard.
For user testing: We recommend using PNG files and using one of our receipts in the "test_receipts" folder.
| Name | UNI |
|---|---|
| Daniel Manjarrez | dam2274 |
| Brandon Pae | btp2109 |
| Kevin Gutierrez | kmg2226 |
| Jivin Yalamanchili | jy3375 |
The application is deployed on Heroku and can be accessed at:
- Modern Dark Theme UI - Sleek, professional dashboard with gradient backgrounds
- Real-time Metrics Display - Key performance indicators at a glance
- Interactive Charts - Powered by Chart.js for data visualization
- Responsive Design - Works on desktop, tablet, and mobile devices
- Sidebar Navigation - Easy access to all sections
- Total Amount
- Order Count
- Average Costs
- Profit Margin
- Customer Engagement Score
- Category Breakdown (Food, Dessert, Drink)
- Product Sales Analysis
- Upload receipt images
- OCR-powered data extraction
- View receipt history
- Ruby 3.3
- Rails 8.0
- SQLite3 (for development/test)
- Bundler
- Azure OpenAI credentials (endpoint, API key, deployment name, API version)
-
Clone the Repository
git clone https://github.com/your-username/SeatSync.git cd SeatSync -
Install Dependencies
bundle install
-
Configure Environment Create a
.envfile in the project root with your Azure OpenAI settings:AZURE_OPENAI_ENDPOINT="https://<your-resource>.openai.azure.com" AZURE_OPENAI_API_KEY="..." AZURE_OPENAI_API_VERSION="2024-02-15-preview" AZURE_OPENAI_CHAT_DEPLOYMENT="gpt-4o" -
Setup Database
# Create the database rails db:create # Run migrations rails db:migrate # (Optional) Seed with sample data rails db:seed
-
Start the Rails Server
rails server
-
Access the Application
Open your web browser and navigate to:
http://localhost:3000You should be automatically redirected to the restaurant dashboard at:
http://localhost:3000/dashboardMain Features:
- 📊 Dashboard - Modern analytics dashboard with charts and metrics
- 🧾 Receipts - Access via sidebar "Sales" or
/receipts
- Click "Upload New Receipt" on the dashboard
- Select a receipt image (JPG, PNG, or HEIC format)
- Click "Upload Photo"
- View the extracted information on the dashboard
- The dashboard displays all uploaded receipts with:
- Date
- Time
- List of food items
- Click "View" to see individual receipt details and the original image
If you ran rails db:seed, you'll see 5 sample receipts with various meal data for testing.
RSpec Unit Tests are located in:
spec/controllers/- Controller testsspec/models/- Model testsspec/services/- Service tests
Cucumber Integration Tests are located in:
features/*.feature- Feature files with test scenariosfeatures/analytics.feature- Analytics calculation testsfeatures/dashboard.feature- Dashboard display testsfeatures/dashboard_navigation.feature- Navigation testsfeatures/upload_receipt.feature- Receipt upload tests
features/step_definitions/- Step definition implementations
- Install dependencies:
bundle install- Setup test database:
RAILS_ENV=test rails db:create
RAILS_ENV=test rails db:migrate# Run all tests
bundle exec rspec
# Run specific test file
bundle exec rspec spec/services/receipt_parser_spec.rb
bundle exec rspec spec/controllers/receipts_controller_spec.rb
# Run specific test by line number
bundle exec rspec spec/services/receipt_parser_spec.rb:11242 examples, 0 failures
Already complete if you ran RSpec setup above.
# Run all Cucumber features
bundle exec cucumber
# Run specific feature
bundle exec cucumber features/upload_receipt.feature
# Run specific scenario by line number
bundle exec cucumber features/upload_receipt.feature:629 scenarios (29 passed)
164 steps (164 passed)
bundle exec rspec && bundle exec cucumberrails console
ReceiptItem.delete_all
Receipt.delete_all
ActiveStorage::Attachment.where(record_type: "Receipt").find_each(&:purge)
ActiveStorage::Blob.joins(:attachments).where(active_storage_attachments: { record_type: "Receipt" }).find_each(&:purge)
Rails.cache.clear
exit
rails db:seed