{"id":23721691,"url":"https://github.com/augusthottie/h2oexpress","last_synced_at":"2025-09-03T22:31:32.911Z","repository":{"id":180978779,"uuid":"662256495","full_name":"augusthottie/H2OExpress","owner":"augusthottie","description":"Django project using AWS S3 and RDS","archived":false,"fork":false,"pushed_at":"2024-09-17T20:14:47.000Z","size":1477,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T22:38:42.633Z","etag":null,"topics":["braintree","django","django-project","postgresql","rds","s3"],"latest_commit_sha":null,"homepage":"https://h20express.pythonanywhere.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/augusthottie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-04T17:52:00.000Z","updated_at":"2024-12-13T07:23:41.000Z","dependencies_parsed_at":"2024-09-08T21:29:31.591Z","dependency_job_id":"9b92d9c4-0312-4f24-a8fe-688a6a1c804f","html_url":"https://github.com/augusthottie/H2OExpress","commit_stats":null,"previous_names":["augusthottie/h2oexpress"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/augusthottie/H2OExpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augusthottie%2FH2OExpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augusthottie%2FH2OExpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augusthottie%2FH2OExpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augusthottie%2FH2OExpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/augusthottie","download_url":"https://codeload.github.com/augusthottie/H2OExpress/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augusthottie%2FH2OExpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273522933,"owners_count":25120857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["braintree","django","django-project","postgresql","rds","s3"],"created_at":"2024-12-30T22:38:50.850Z","updated_at":"2025-09-03T22:31:32.529Z","avatar_url":"https://github.com/augusthottie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# H2OExpress\n\n**H2OExpress** is a Django web application that allows users to conveniently purchase household water online. The platform simplifies water delivery by providing an easy-to-use interface for purchases, profile management, and transaction tracking.\n\n## Features\n\n- **User Registration**: Sign up by providing a username, email, meter number, name, address, phone number, and password.\n- **Water Purchase**: Select your desired water quantity and complete the purchase through secure payment options.\n- **Transaction History**: Access a detailed history of past purchases, including units bought, transaction details, and payment methods.\n- **Profile Management**: Update personal information, including meter number, address, and phone number.\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/AugustHottie/H2OExpress.git\n   ```\n\n2. Create and activate a virtual environment:\n\n   ```bash\n   python3 -m venv \u003cenv-name\u003e\n   source \u003cenv-name\u003e/bin/activate\n   ```\n\n3. Install the project dependencies:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. Run the database migrations:\n\n   ```bash\n   python manage.py migrate\n   ```\n\n5. Start the development server:\n\n   ```bash\n   python manage.py runserver\n   ```\n\n## Technologies Used\n\n- **Python** \u0026 **Django**\n- **HTML**, **CSS** (Tailwind), **JavaScript**\n- **AWS RDS**: Managed PostgreSQL database\n- **AWS S3**: Storage for static files\n- **AWS EC2**: Deployment of the Dockerized application\n- **Docker**: Containerization of the application\n- **Braintree**: Secure payment processing\n\n## Deployment\n\nH2OExpress is deployed using the following services:\n\n- **AWS S3**: Serves static assets like CSS, JavaScript, and images, ensuring scalability and fast delivery.\n- **AWS RDS**: A managed PostgreSQL database for reliable and scalable data management.\n- **AWS EC2**: For deployment of the Dockerized application.\n- **Docker**: Used for containerization of the application.\n- **Braintree**: Handles secure payment processing for water purchases via credit card transactions.\n\n### Deployment Steps\n\nTo deploy the application in your environment, follow these steps:\n\n1. **AWS S3 Setup**:\n   - Create an S3 bucket for static files.\n   - Update `settings.py` with your AWS S3 bucket name, access key, and secret key.\n\n2. **AWS RDS Setup**:\n   - Create an RDS PostgreSQL instance.\n   - Update `settings.py` with your RDS endpoint, database name, username, and password.\n\n3. **Braintree Setup**:\n   - Sign up for a Braintree account.\n   - Update `settings.py` with your Braintree merchant ID, public key, and private key.\n\n4. **Migrate the Database**:\n   - Run Django migration commands to apply the database schema.\n\n5. **Collect Static Files**:\n   - Use `collectstatic` to gather all static files and upload them to AWS S3.\n\n6. **Run the Server**:\n   - Use `manage.py runserver` to start the Django development server.\n\n### Live Demo\n\nCheck out the live application [here](https://h20express.pythonanywhere.com).\n\n### Payment Testing\n\nTo test the payment functionality using Braintree, use the following test credit card numbers:\n\n- **Visa**: 4111 1111 1111 1111\n- **Mastercard**: 5555 5555 5555 4444\n\n### Docker Deployment\n\nTo deploy with Docker:\n\n1. Build the Docker image:\n\n   ```bash\n   docker build -t \u003cimage-name\u003e .\n   ```\n\n2. Run Docker Compose:\n\n   ```bash\n   docker-compose build \u0026\u0026 docker-compose up\n   ```\n\n### EC2 Deployment\n\nTo deploy the Dockerized application on AWS EC2 using an AWS Linux image:\n\n1. **Update the instance and install necessary dependencies**:\n   ```bash\n   sudo yum update -y\n   sudo yum install -y python3 python3-pip nginx git docker\n   ```\n\n2. **Start Docker and enable it**:\n   ```bash\n   sudo systemctl start docker\n   sudo systemctl enable docker\n   sudo usermod -aG docker ec2-user\n   ```\n\n3. **Install Docker Compose**:\n   ```bash\n   sudo curl -L \"https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n   sudo chmod +x /usr/local/bin/docker-compose\n   ```\n\n4. **Create and activate a virtual environment**:\n   ```bash\n   python3 -m venv .venv\n   source .venv/bin/activate\n   ```\n\n5. **Run Docker Compose to start the application**:\n   ```bash\n   docker compose up -d --build\n   ```\n\n**Note**: Ensure you open the necessary ports in the security group (e.g., `8000`, `80`, `443`) for the application to work.\n\nFor detailed instructions on setting up AWS services, refer to the [AWS documentation](https://docs.aws.amazon.com/). Similarly, consult the [Braintree documentation](https://support.checkfront.com/hc/en-us/articles/115004847353-Setting-up-Braintree-Direct-as-your-Checkfront-payment-provider) for payment integration details.\n\n## Contributing\n\nContributions are welcome! If you encounter a bug or have suggestions for improvement, feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugusthottie%2Fh2oexpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugusthottie%2Fh2oexpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugusthottie%2Fh2oexpress/lists"}