This repository contains a web application that tracks and manages mock Web Applications developed by the Province of BC.
- Health Endpoint: Includes a health endpoint at
http://localhost:3000/api/health
that returns an HTTP 200 response, indicating the API component is healthy. - CRUD Operations: Supports all basic CRUD operations (
GET
,POST
,PUT
,DELETE
) with appropriate HTTP status codes. For example, retrieving a specific product usingGET http://localhost:3000/api/product/:productId
. - Sample Data: The API is pre-populated with up to 40 sample products.
- View All Products: Any user can view a list of all products within ECC along with relevant details such as Product Number, Product Name, Scrum Master, Product Owner, Developer Names, Start Date, Methodology, and Location (GitHub repository link).
- Switch Between Personas: Switch between two distinct personas, Lisa and Alan. Different features are available to each user.
- Add New Product: Lisa can add a new product to the list. They must fill in all necessary information including Product Name, Scrum Master, Product Owner, Developer Names, Start Date, and Methodology.
- Edit Existing Product: Alan can edit existing product details. Fields available for editing include Product Name, Scrum Master, Product Owner, Developer Names, Methodology, and Location (GitHub repository link).
- Search by Scrum Master: Lisa can search for products by the name of the Scrum Master. The list will update to only show products where the searched Scrum Master is involved.
- Search by Developer: Alan can search for products by the name of a Developer. The list will update to only show products where the searched Developer is involved.
- Toggle Product ID Order: A toggle on the Product ID table header to order by Ascending or Descending.
- Swagger Documentation: All API endpoints are documented using Swagger and can be accessed locally at
http://localhost:3000/api/api-docs
.
- Automatic Product Number Generation: When adding a new product, the Product Number is automatically generated and will not collide with existing Product Numbers.
- Data Persistence: Any added or edited data persists even after a page refresh.
- Backend: Rails (Ruby)
- Frontend: React (Leveraging react-bootstrap)
- Docker
- Ruby, Rails, npm (optional, if you are running outside Docker)
To run the solution using Docker Compose, you'll find a docker-compose.yml
file at the top-level directory of this repository. You need to:
-
Clone this repository.
git clone https://github.com/alexmcdermid/Alexander-McDermid-ecc-dssb-IS24-code-challenge.git
-
Navigate into the cloned repository.
cd Alexander-McDermid-ecc-dssb-IS24-code-challenge
-
Run Docker Compose. This will start up all the necessary services as defined in the
docker-compose.yml
file.docker-compose up
-
Navigate to
http://localhost:3001/
in your browser of choice.http://localhost:3001/
If you want to run the Rails backend without Docker, you'll need Ruby and Rails installed on your machine. Follow these steps:
-
Navigate to the backend directory.
cd rails_api
-
Install dependencies.
bundle install
-
Start the Rails server.
rails s
If you're running the frontend without Docker, you will need npm. Run the following commands:
cd react_frontend
npm install
npm start