Ecomm is a full-stack Ruby on Rails 7 e-commerce application with seamless checkout functionality, user authentication, and modern styling. It is powered by Hotwire, Stimulus, and Tailwind CSS for interactivity and design. Stripe handles the payment processing, PostgreSQL serves as the database, and Devise manages user authentication.
- User Authentication: Secure user sign-up and login using Devise.
- Checkout: Integrated Stripe payment gateway for handling transactions.
- Real-time Updates: Uses Hotwire with Turbo and Stimulus for dynamic updates without full page reloads.
- Responsive Design: Tailwind CSS ensures mobile-first responsive design.
- PostgreSQL Database: Efficient and scalable database for handling product and user data.
- Backend: Ruby on Rails 7
- Frontend: Hotwire (Turbo, Stimulus), Tailwind CSS
- Database: PostgreSQL
- Authentication: Devise
- Payments: Stripe
Ensure you have the following installed:
- Ruby 3.0+
- Rails 7.x
- PostgreSQL
- Node.js
-
Clone the repository:
git clone https://github.com/your-username/ecomm.git cd ecomm
-
Install dependencies:
bundle install
-
Set up PostgreSQL:
- Make sure PostgreSQL is installed and running.
- Create the database and run migrations:
bin/rails db:create bin/rails db:migrate
-
Seed the database (optional):
bin/rails db:seed
-
Edit Rails credentials to store your Stripe API keys securely:
EDITOR="code --wait" bin/rails credentials:edit
This will open the credentials file in VSCode (or your preferred editor). Add your Stripe keys in the following format:
stripe: secret_key: your_stripe_secret_key public_key: your_stripe_public_key
-
Once the keys are added and saved, Rails will securely manage them using encrypted credentials.
-
Run the Rails server:
rails s
-
Navigate to the app in your browser: Open
http://localhost:3000
andhttp://localhost:3000/admin
to see the application in action. -
User Authentication:
- You can sign up or log in to manage your account.
- Admin users can manage products and orders.
-
Checkout:
- Add products to the cart and proceed to checkout.
- Complete the transaction through Stripe’s secure payment gateway.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature"
- Push to the branch:
git push origin feature-name
- Open a pull request for review.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries, feel free to reach out:
- Thadeus Maraga
- Your Email
- GitHub Profile
- LinkedIn Profile
- Website