{"id":24997942,"url":"https://github.com/mohamad-shosha/spring-aws-edu","last_synced_at":"2025-03-29T16:25:49.640Z","repository":{"id":275662671,"uuid":"924106306","full_name":"Mohamad-shosha/Spring-Aws-Edu","owner":"Mohamad-shosha","description":"SpringAWSEdu is a Spring Boot application that integrates Spring MVC with JPA and Hibernate, hosted on AWS using Docker and Liquibase for database management. It allows CRUD operations on Instructor, Address, and Course entities while ensuring security and scalability with AWS services.","archived":false,"fork":false,"pushed_at":"2025-02-04T21:51:56.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T22:08:03.675Z","etag":null,"topics":["aws","css","design-patterns","docker","docker-compose","ec2","elasticbeanstalk","hibernate","html","java","jpa","liquibase","parameter-store","profilesmanager","rds","spring","spring-boot","spring-mvc","spring-security","vpc-security"],"latest_commit_sha":null,"homepage":"https://drive.google.com/drive/folders/1Z7WG3Q52P4SGVnE3FR706UXGT05RHmjF","language":"Java","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/Mohamad-shosha.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":"2025-01-29T12:33:30.000Z","updated_at":"2025-02-04T21:52:00.000Z","dependencies_parsed_at":"2025-02-03T22:31:34.654Z","dependency_job_id":"733d8bc7-d78a-4003-9a79-ca02377e21ba","html_url":"https://github.com/Mohamad-shosha/Spring-Aws-Edu","commit_stats":null,"previous_names":["mohamad-shosha/spring-aws-edu","mohamad-shosha/spring-aws"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohamad-shosha%2FSpring-Aws-Edu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohamad-shosha%2FSpring-Aws-Edu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohamad-shosha%2FSpring-Aws-Edu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohamad-shosha%2FSpring-Aws-Edu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mohamad-shosha","download_url":"https://codeload.github.com/Mohamad-shosha/Spring-Aws-Edu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246210096,"owners_count":20741109,"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","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":["aws","css","design-patterns","docker","docker-compose","ec2","elasticbeanstalk","hibernate","html","java","jpa","liquibase","parameter-store","profilesmanager","rds","spring","spring-boot","spring-mvc","spring-security","vpc-security"],"created_at":"2025-02-04T17:26:44.897Z","updated_at":"2025-03-29T16:25:49.630Z","avatar_url":"https://github.com/Mohamad-shosha.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✨ SpringAWSEdu\n\nThis project showcases the powerful integration of **Spring MVC** with **Java Persistence API (JPA)**, utilizing **Hibernate** for efficient Object-Relational Mapping (ORM). Now deployed on **AWS** using **Elastic Beanstalk**, **EC2**, **RDS**, **IAM**, **VPC Security**, and more.\n\n## ✨ Key Features:\n- **Seamless Backend Integration**: Effortlessly manage and query data with a robust backend framework.\n- **Advanced AWS Deployment**: Hosted on AWS using Elastic Beanstalk, EC2, and RDS, ensuring high availability and scalability.\n- **Core Entities**:\n  - **Instructor**: Manage instructor details and associated courses.\n  - **Address**: Handle address information for instructors and courses.\n  - **Course**: Organize and maintain course offerings and their related entities.\n- **Database Schema Management**: Leverage **Liquibase** to manage database versioning and migrations, ensuring smooth transitions during updates.\n- **API Testing**: Utilize **Postman** as a client for testing API endpoints, making it easy to verify and validate the functionality of your application.\n- **Enhanced Security**: \n  - Secure roles and permissions with **IAM Roles**.\n  - Use **AWS Systems Manager Parameter Store** for securely storing database credentials.\n  - Implement **Spring Profiles** for environment-specific configurations (**dev, prod**), improving security and maintainability.\n- **Docker Integration**: Easily deploy using Docker with pre-configured containerization support.\n- **Scalable \u0026 Secure Architecture**:\n  - Utilize **VPC Security Groups** to control network access.\n  - **Route 53 Integration** for a custom domain setup.\n- **Performance Optimization**: Utilize caching, connection pooling, and optimized database queries for high efficiency.\n- **MVC Architecture**: Utilize a clean and organized *Model-View-Controller* architecture for clear separation of concerns.\n- **Dynamic Web Pages**: Render interactive and dynamic web pages with *Thymeleaf*.\n- **CRUD Operations**: Perform *Create, Read, Update, and Delete* operations for Instructor, Address, and Course entities.\n\nWith this setup, you can efficiently build and maintain a robust, secure, and scalable application tailored to your data management needs!\n\n## 📝 Table of Contents\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Getting Started](#getting-started)\n- [Technologies](#technologies)\n- [Demo](#demo)\n- [Docker](#docker)\n- [AWS Deployment](#aws-deployment)\n- [Deployment Process](#deployment-process)\n- [Security Enhancements](#security-enhancements)\n- [Resources](#resources)\n\n## 🎥 Demo\n\n[Watch the demo video here](https://drive.google.com/drive/folders/1Z7WG3Q52P4SGVnE3FR706UXGT05RHmjF)\n\n## 🐙 Docker\n\nTo push your Docker image to Docker Hub, use the following command:\n\n```bash\ndocker push your-docker-repo/spring-mvc-app:latest\n```\n\n## 🌐 AWS Deployment\n\nThe project is now deployed on AWS using the following services:\n- **Elastic Beanstalk**: Automates the deployment process.\n- **EC2**: Provides scalable computing resources.\n- **RDS (MySQL)**: Secure and managed database service.\n- **IAM Roles**: Controls access permissions.\n- **VPC Security**: Restricts network access.\n- **Route 53**: Custom domain setup.\n\n## 🚀 Deployment Process\n\n### Step 1: Build the JAR File\nRun the following command to build the project:\n```bash\nmvn clean package -DskipTests\n```\n\n### Step 2: Using Awspring to access the dependencies of pom.xml\nAdd the following dependencies to build the project:\n```bash\n\u003cdependencyManagement\u003e\n        \u003cdependencies\u003e\n            \u003cdependency\u003e\n                \u003cgroupId\u003eio.awspring.cloud\u003c/groupId\u003e\n                \u003cartifactId\u003espring-cloud-aws-dependencies\u003c/artifactId\u003e\n                \u003cversion\u003e3.2.0\u003c/version\u003e\n                \u003ctype\u003epom\u003c/type\u003e\n                \u003cscope\u003eimport\u003c/scope\u003e\n            \u003c/dependency\u003e\n        \u003c/dependencies\u003e\n    \u003c/dependencyManagement\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.awspring.cloud\u003c/groupId\u003e\n            \u003cartifactId\u003espring-cloud-aws-starter-parameter-store\u003c/artifactId\u003e\n        \u003c/dependency\u003e\n\n```\n\n### Step 2: Upload the JAR File to AWS\nUse AWS Elastic Beanstalk CLI or AWS Management Console to upload the JAR file.\n```bash\new deploy --application-name my-spring-app --environment-name my-env --version-label v1 --source-bundle myapp.jar\n```\n\n### Step 3: Monitor Deployment\nMonitor the deployment logs on AWS Elastic Beanstalk to ensure successful deployment.\n\n### Step 4: Test the Application\nAccess your deployed application at:\n```bash\nhttp://your-app-env.elasticbeanstalk.com\n```\n\n### Step 5: Set Up Route 53\nTo associate a custom domain with your application:\n1. Purchase a domain from AWS Route 53.\n2. Create a new hosted zone in Route 53.\n3. Configure an **A record** to point to the Elastic Beanstalk environment.\n4. Update the domain settings to reflect the new changes.\n5. Verify the domain mapping works correctly.\n\n## 🔒 Security Enhancements\n- **AWS Parameter Store** for securely storing credentials.\n- **Spring Profiles (dev, prod)** for environment-specific settings.\n- **Database credentials secured via AWS Systems Manager Parameter Store**.\n```properties of prod\nspring.config.import=aws-parameterstore:/config/instructor-db\n```\n\n## 🐂 Prerequisites\n\nBefore you begin, ensure you have the following:\n- *Java Development Kit (JDK 11 or later)* installed.\n- *Maven* for dependency management.\n- *Postman* for API testing.\n- *Docker* installed for containerization.\n- *AWS CLI* configured for deployment.\n\n## 💾 Getting Started\n\n### 🚀 Step 1: Create a Spring Boot Project\n\nGenerate a new Spring Boot project using [Spring Initializr](https://start.spring.io/) with:\n- **Project**: Maven Project\n- **Language**: Java\n- **Spring Boot**: Latest stable version\n- **Packaging**: Jar\n- **Dependencies**: Spring Web, Spring Data JPA, Thymeleaf, Liquibase, MySQL Driver\n\n### 💪 Step 2: Configure Database \u0026 Liquibase\n\nUpdate `application.properties`:\n```properties\nspring.liquibase.change-log=db/changelog/db_master_changelog.xml\n\n# Use environment variables for security\ndatabase.url=jdbc:mysql://localhost:3307/mydb\ndatabase.username=root\ndatabase.password=shosh404@@\n\nspring.datasource.url=${database.url}\nspring.datasource.username=${database.username}\nspring.datasource.password=${database.password}\n```\n\n### 👨‍💻 Step 3: Define Entities \u0026 Repositories\n\nCreate entities for **Instructor**, **Address**, and **Course**, and define repository interfaces for each.\n\n### 🔧 Step 4: Implement Service Layer \u0026 Controllers\n\nDevelop services to handle business logic and controllers to manage HTTP requests.\n\n### 🎨 Step 5: Create Thymeleaf Views\n\nDesign templates for user interactions.\n\n### 🔍 Step 6: Test Using Postman\n\nVerify API functionality with Postman by sending **CRUD** requests.\n\n### ▶️ Step 7: Run Your Application\n\nStart your Spring Boot application. The server will be available at:\n[http://localhost:8082](http://localhost:8082)\n\n## 💽 Resources\n- [Spring Boot Documentation](https://spring.io/projects/spring-boot)\n- [Spring MVC Documentation](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc)\n- [JPA and Hibernate Guide](https://docs.jboss.org/hibernate/orm/current/userguide/html_single/)\n- [Liquibase Documentation](https://www.liquibase.org/documentation/index.html)\n- [Postman Documentation](https://learning.postman.com/)\n- [Thymeleaf Documentation](https://www.thymeleaf.org/documentation.html)\n- [Docker Documentation](https://docs.docker.com/get-started/)\n- [AWS Documentation](https://docs.aws.amazon.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamad-shosha%2Fspring-aws-edu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamad-shosha%2Fspring-aws-edu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamad-shosha%2Fspring-aws-edu/lists"}