This README would normally document whatever steps are necessary to get the application up and running.
-
Description This is a Rails application that allows users to view their order history and download it as a CSV file.
-
Features 1.List users along with their email addresses. 2.Each user has a "Download" button to download their order history as a CSV file. 3.Order history includes details such as order ID, product name, quantity, price, etc.
-
Clone the repository:
$ git clone <repository-url>
-
Navigate to the project directory:
$ cd avaamo_app
-
Install dependencies:
$ bundle install
-
Set up the database:
$ rails db:create
$ rails db:migrate
-
Sidekiq is used for backgroung processing so we should install redis to configure sidekiq.
$ install redis
-
Run the below command in the project dir to start redis server in backgroung locally
$ brew services start redis
-
Run the below command in the project dir to run sidekiq server locally
$bundle exec sidekiq
-
Start the Rails server
$ rails server
Open your browser and visit http://localhost:3000 to access the application.
- Currently authentication is not setup for application, so you can directly access it.
- Once visit http://localhost:3000/users you will be able to see a list of users along with their email addresses and button to download order history of user.
- Click on the "Download" button next to a user to download their order history as a CSV file.