A web application for collecting and managing family driver reviews through a web-based interface, with feedback being sent to a Discord channel.
This application allows family members to submit reviews of drivers, including ratings and comments. All reviews are automatically sent to a designated Discord channel for easy tracking and visibility.
- Web-based form interface
- Mobile-responsive design
- Dynamic family member selection
- Dynamic driver selection
- Custom name input for non-listed members
- Interactive 5-star rating system
- Auto-populated review comments based on rating
- Comment submission
- Discord integration for review notifications
- RESTful API for programmatic access
- HTML5
- CSS3
- JavaScript
- Responsive design using flexbox
- Node.js
- Express.js
- Multer for form data processing
- Discord webhook integration
- Docker
- Docker Compose
- GitHub Actions for CI/CD
- GitHub Container Registry
- Pull the container image:
docker pull ghcr.io/d3v0ps-cloud/ratemyride:latest
- Create a
.envfile with required environment variables - Run the container:
docker run -p 3000:3000 --env-file .env ghcr.io/d3v0ps-cloud/ratemyride:latest
- Clone the repository
- Copy the environment file and configure:
cp .env.example .env
- Start the Docker container:
docker-compose up -f docker-compose-prebuilt.yml
- Access the application at
http://localhost:3000
- Clone the repository
- Install dependencies:
npm install
- Copy the environment file and configure:
cp .env.example .env
- Update the
.envfile with:- Your Discord webhook URL
- List of family members (comma-separated)
- Star rating descriptions (optional)
- Start the server:
npm start
- Access the application at
http://localhost:3000
- Clone the repository
- Copy the environment file and configure:
cp .env.example .env
- Update the
.envfile with:- Your Discord webhook URL
- List of family members (comma-separated)
- Star rating descriptions (optional)
- Build and start the Docker container:
docker-compose up --build
- Access the application at
http://localhost:3000
The application provides two selection groups:
- "Who are you?" - For selecting the reviewer
- "Who was the driver?" - For selecting the person being reviewed
Each selection group includes:
- Radio buttons for pre-configured family members from the FAMILY_MEMBERS environment variable
- An "Other" option that, when selected:
- Shows a text input field
- Allows entering a custom name
- The custom name will be used in place of "Other" in the review
- The text input is required when "Other" is selected
- The text input is hidden when any other option is selected
- Select a rating from 1 to 5 stars
- When a star is selected:
- The comment field is automatically populated with the corresponding description
- The description comes from STAR_DESCRIPTIONS_* environment variables if set
- Default descriptions are used if no custom ones are provided
- The populated comment can be modified before submission
- If unmodified, the auto-populated text will be submitted with the review
Returns the list of configured family members.
GET /api/family-members{
"familyMembers": ["Mum", "Dad", "Oliver", "Jack", "Other"]
}curl http://localhost:3000/api/family-membersReturns the configured descriptions for each star rating.
GET /api/star-descriptions{
"descriptions": {
"1": "Terrible ride, I feared for my life",
"2": "Below average driving, needs improvement",
"3": "Average ride, got me there safely",
"4": "Great ride, felt safe and comfortable",
"5": "Excellent ride, perfect driving skills"
}
}curl http://localhost:3000/api/star-descriptionsSubmits a new review.
- Content-Type:
application/x-www-form-urlencodedormultipart/form-data
| Name | Type | Required | Description |
|---|---|---|---|
| family_member | string | Yes | The name of the family member submitting the review (or custom name if "Other" was selected) |
| custom_family_member | string | No | Custom name when "Other" is selected for family member |
| driver | string | Yes | The name of the driver being reviewed (or custom name if "Other" was selected) |
| custom_driver | string | No | Custom name when "Other" is selected for driver |
| rating | number | Yes | Rating from 1 to 5 |
| comment | string | No | Additional comments about the ride (auto-populated based on rating if not modified) |
- Success: Text response with "Thank you for your review!"
- Error: Text response with error message
curl -X POST http://localhost:3000/submit \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "family_member=Dad" \
-d "driver=Mum" \
-d "rating=5" \
-d "comment=Great driving!"fetch('http://localhost:3000/submit', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
family_member: 'Dad',
driver: 'Mum',
rating: '5',
comment: 'Great driving!'
})
})
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));- 400 Bad Request: Missing required fields
- 500 Internal Server Error: Failed to send to Discord
The application is automatically built and published to GitHub Container Registry using GitHub Actions.
latest: Latest build from the main branchvX.Y.Z: Release versions (e.g., v1.0.0)vX.Y: Minor version tags (e.g., v1.0)sha-XXXXXXX: Specific commit builds
The GitHub Actions workflow automatically:
- Builds the Docker image
- Runs tests (if any)
- Publishes to GitHub Container Registry on:
- Pushes to main branch
- Release tags (v*)
- Generates appropriate tags and labels
ratemyride/
├── .github/
│ └── workflows/ # GitHub Actions workflows
│ └── docker-build.yml
├── public/
│ └── index.html # Frontend interface
├── server.js # Express server and API endpoints
├── package.json # Project dependencies
├── Dockerfile # Docker image configuration
├── docker-compose.yml # Docker Compose configuration
├── .env.example # Example environment variables
└── README.md # Documentation
The application requires the following environment variables:
DISCORD_WEBHOOK_URL: The webhook URL for your Discord channelFAMILY_MEMBERS: Comma-separated list of family members (e.g., "Mum,Dad,Oliver,Jack,Other")
Optional star rating description variables:
STAR_DESCRIPTIONS_1: Description for 1-star ratingSTAR_DESCRIPTIONS_2: Description for 2-star ratingSTAR_DESCRIPTIONS_3: Description for 3-star ratingSTAR_DESCRIPTIONS_4: Description for 4-star ratingSTAR_DESCRIPTIONS_5: Description for 5-star rating
If star descriptions are not provided, default descriptions will be used:
1 star: "Terrible ride, I feared for my life"
2 stars: "Below average driving, needs improvement"
3 stars: "Average ride, got me there safely"
4 stars: "Great ride, felt safe and comfortable"
5 stars: "Excellent ride, perfect driving skills"
These can be configured by:
- Creating a
.envfile based on.env.example - Setting the variables in your environment
- Passing them through Docker Compose
- Web-based form interface
- Responsive and mobile-friendly design
- Dynamic family member selection from configured list
- Dynamic driver selection from configured list
- Custom name input for "Other" selections
- 5-star rating system with auto-populated review text
- Comment text area
- Submit button
- Form submission handling
- Data validation
- Discord webhook integration
- Submission confirmation
- Custom name handling for "Other" selections
- Form submissions process within 2 seconds
- Interface loads within 1 second
- Secure webhook URL handling
- Form validation against malicious submissions
- Clean, intuitive interface
- Consistent styling
- Clear visual feedback
- Responsive design for all screen sizes
- Auto-populated review text based on rating
- Seamless custom name input for "Other" selections
- Support for modern web browsers
- Consistent cross-platform experience
- Sends formatted messages to Discord channel
- Message format: "New review from [Family Member]: [Rating] stars. The Driver was: [Driver]. Comment: [Comment]"
- Form validation errors
- Network connectivity issues
- Discord API rate limits
- Failed submission handling
- Missing environment variables handling
- Invalid custom name inputs
- Successful form submissions
- Accurate delivery of reviews to Discord
- User-friendly interface
- Responsive design across devices
- Clear submission confirmation
- Dynamic loading of family members
- Auto-populated review text based on rating
- Proper handling of custom names for "Other" selections
MIT License
