Railestate is a web application built with Ruby on Rails 7, serving as a playground for exploring the Hotwired suite. This suite, which includes Turbo and Stimulus, allows for SPA-like interactivity within a Rails application. Tailwind CSS is used for styling, and PostgreSQL serves as the database. The application also supports OAuth authentication with Google and enables image uploads that are stored in AWS. For consistent development and deployment, Railestate is containerized using Docker. The application also features a RESTful API for programmatic access to Railestate listings.
- User Authentication: Users can sign up using their email and password or via Google OAuth.
- Railestate Listings: Users can post real estate ads with detailed information.
- Image Uploads: Support for uploading and storing images related to listings in AWS.
- SPA Functionality: Uses Hotwire's Turbo and Stimulus for a fast, SPA-like user experience.
- Dockerization: Containerized environment for consistent development and deployment.
- RESTful API: Provides a RESTful API that allows you to programmatically manage and retrieve Railestate listings.
- Swagger Documentation: Detailed explanation and interactive capabilities for the API, please log in and navigate to the Swagger documentation available on your profile page (Coming Soon).
- Backend: Ruby on Rails 7
- Frontend: Tailwind CSS
- Database: PostgreSQL
- JavaScript: Stimulus
- SPA Interactivity: Turbo
- Image Storage: AWS
- Containerization: Docker
Docker allows you to encapsulate all the dependencies and configurations into a single container, ensuring that the application runs consistently across various environments.
Before running the application, create a .env
file based on the provided .env.sample
and fill in the required values.
-
Build the Docker Image
docker build -t railestate .
This command builds a Docker image named
railestate
, utilizing the instructions laid out in the Dockerfile. -
Run the Docker Container
docker run -p 3000:3000 railestate
This runs a container based on the
railestate
image and maps port 3000 inside the container to port 3000 on your local machine. -
Access the Application Open a web browser and navigate to
http://localhost:3000
to access the application. -
Stopping the Container To halt the running container, find the container ID with the
docker ps
command, then stop it usingdocker stop <CONTAINER_ID>
.
We welcome contributions to Railestate! This section outlines the process for contributing to the project.
-
Fork the Repository:
- First, fork the Railestate repository to your own GitHub account.
-
Clone Your Fork:
- Clone the forked repository to your local machine using
git clone
.
- Clone the forked repository to your local machine using
Before making any changes, it's good practice to create an issue describing the bug you're fixing or the feature you're adding. This gives team members and maintainers a chance to give feedback before you invest time in a pull request.
- Navigate to the Issues tab in the Railestate repository.
- Create a new issue, providing as much detail as possible.
-
Create a Branch:
- Always create a new branch for each issue you are working on. Name your branch something descriptive that indicates its purpose, e.g.,
feature/add-oauth-support
orbugfix/resolve-login-issue
.
- Always create a new branch for each issue you are working on. Name your branch something descriptive that indicates its purpose, e.g.,
-
Commit Your Changes:
- Make your changes and commit them to your branch. Use clear and descriptive commit messages.
Ensure that you test your changes thoroughly before submitting a pull request.
-
Push to Your Fork:
- Push your changes to the branch in your forked repository on GitHub.
-
Create a Pull Request:
- Navigate to the Pull Requests tab in the original Railestate repository, and click "New Pull Request."
-
Base and Compare:
- Set the base repository to
Railestate
's main branch and the compare repository to your forked repo's branch.
- Set the base repository to
-
Submit:
- Submit your pull request and provide a brief summary of the changes you've made.
Once a pull request is open, maintainers will review your code. They may request changes or clarifications. Once all comments have been addressed, the pull request can be merged.
Since the main branch is protected, only maintainers can merge pull requests. After a successful code review, a maintainer will merge your changes.