CediPower is a Rails application that helps users track and compare prices of goods across various markets and stores in Ghana. The platform provides real-time price information, historical trends, and market comparisons to help consumers make informed purchasing decisions.
- Price Tracking: Monitor prices of various items across different markets
- Market Directory: Browse through various markets and stores in Ghana
- Category Navigation: Browse items by categories
- Price History: View historical price trends with charts
- User Roles:
- Admin: Manage all aspects of the platform
- Store Owner: Manage market prices and information
- General User: Track prices and save favorite items
- PWA Support: Progressive Web App capabilities for mobile users
- SEO Optimized: Built-in SEO features with meta tags and sitemap generation
- Backend: Ruby 3.3.6, Rails 8.0.0
- Database: PostgreSQL
- Frontend: Tailwind CSS, Hotwire (Turbo & Stimulus)
- Authentication: Devise
- Authorization: Pundit
- Charts: Chartkick & Groupdate
- SEO: FriendlyId, meta-tags, sitemap_generator
- Testing: Minitest, Capybara
- Deployment: Docker, Kamal
Before you begin, ensure you have installed:
- Ruby 3.3.6
- PostgreSQL
- Node.js & Yarn
- Docker (for production deployment)
- Clone the repository:
git clone https://github.com/smorttey/cedi_power.git
cd cedi_power- Install dependencies:
bundle install- Setup database:
bin/rails db:prepare- Start the development server:
bin/devVisit http://localhost:3000 to see the application.
Run the test suite:
bin/rails test # Run all tests
bin/rails test:system # Run system tests
bin/rails test:controllers # Run controller testsRun the linters:
bin/rubocop # Ruby code style checker
bin/brakeman # Security vulnerability scannerDeploy using Kamal:
bin/kamal setup # First-time setup
bin/kamal deploy # Regular deploymentsRequired environment variables:
RAILS_MASTER_KEY=<your-master-key>
DATABASE_URL=postgresql://localhost/cedi_power_development
RAILS_ENV=developmentapp/
├── controllers/ # Application controllers
│ ├── admin/ # Admin namespace
│ └── store_owner/ # Store owner namespace
├── models/ # ActiveRecord models
├── policies/ # Pundit authorization policies
├── views/ # View templates
└── javascript/ # JavaScript files
config/
├── routes.rb # Application routes
└── database.yml # Database configuration
Common issues:
- Database Connection: Ensure PostgreSQL is running
- Asset Compilation: Run
bin/rails assets:precompile - Test Database: Run
bin/rails db:test:prepare
This project is proprietary software
- Built with Ruby on Rails
- Styled with Tailwind CSS
- Charts powered by Chartkick
Made with ❤️ in Ghana 🇬🇭