Skip to content

Commit

Permalink
Specify HTTP error in captcha rescue, update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpressen committed Dec 3, 2024
1 parent 082fa23 commit c3dcae7
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 14 deletions.
124 changes: 111 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,122 @@
# README

This README would normally document whatever steps are necessary to get the
application up and running.

Things you may want to cover:
## Getting Started

* Ruby version

* System dependencies

* Configuration
## Development Setup

* Database creation
To set up the Benefactorum project locally:

* Database initialization
1. **Prerequisites**: Ensure you have [Visual Studio Code](https://code.visualstudio.com/) installed.
2. **Dev Container**: Open the project in VS Code; it will automatically set up the development container.
3. **Start Development**: Once the setup is complete, run the following command to start the development environment:

* How to run the test suite
```bash
bin/dev

* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...


---

# Benefactorum

Benefactorum is a non-profit, collaborative donation platform that enables French donors to easily discover and support the causes they care about.

---

## Features

1. **Find Associations**: Discover organizations that align with your values.
2. **Make Donations**: Donate directly through Benefactorum.
3. **Tax Benefits**: Easily manage your tax deductions.

---

## Tech Stack

### Backend
- **Ruby on Rails 8**: Provides a robust and maintainable backend foundation.
- **SQLite**: Lightweight and efficient database for streamlined deployment and development.

### Frontend
- **React with TypeScript**: Ensures a dynamic and type-safe front-end experience.
- **Inertia.js**: Bridges the gap between Rails and React for fast single-page app functionality.
- **TailwindCSS**: Provides a modern, responsive, and customizable UI.
- **shadcn/ui**: Reusable components for consistent design.

### Build & Deployment
- **Vite**: Efficient asset bundling and faster development builds.
- **Kamal**: Simplified deployment to Scaleway VPS.
- **GitHub Actions**: Manages CI/CD workflows for testing and deployment.

---

## Installation & Setup

### Prerequisites
- Ensure you have [Visual Studio Code](https://code.visualstudio.com/) or [Dev Container CLI](https://github.com/devcontainers/cli) installed.

### Steps
1. Clone the repository:
```bash
git clone https://github.com/Benefactorum/app benefactorum
cd benefactorum
```

2. Start the development server:
```bash
bin/dev
```

3. Open your browser and navigate to:
```
http://localhost:3000
```
---
## Testing
Run tests to ensure stability:
```bash
bundle exec rspec # Backend & e2e tests
yarn test # Frontend tests
```

---

## Contributing

We welcome contributions! To contribute:
1. Fork the repository.
2. Create a feature branch:
```bash
git checkout -b feature/your-feature-name
```
3. Commit your changes:
```bash
git commit -m "Add your feature description"
```
4. Push your branch and open a Pull Request.

Please follow the coding standards enforced by **Standard Ruby**, **Prettier**, and **ESLint**.

---

## License

This project is licensed under the MIT License.

---

## Contact

For any inquiries, feel free to reach out:
- Email: [email protected]
- Manifesto: [benefactorum.org](https://benefactorum.org)
- Web app: https://staging.benefactorum.org

---
2 changes: 1 addition & 1 deletion app/services/captcha.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def valid?
)
result = JSON.parse(response.body)
!!result["success"]
rescue => e
rescue Net::HTTPError => e
Rails.logger.error "Captcha validation error: #{e.message}"
false
end
Expand Down

0 comments on commit c3dcae7

Please sign in to comment.