Skip to content

Radhesham7507/AapalLonar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AapalLonar

Visit a Website>>AaplLonar

Architecture Diagrams

This is Sequence Diagram For Backend
logo

This is Sequence Diagram For Frantend
logo

AapalLonar is a project built with Spring Boot for the backend. This guide provides step-by-step instructions on setting up the project, running it locally, and deploying it on AWS.

Table of Contents


Prerequisites

Before setting up the project, ensure you have the following installed:

  • Java 17 or later
  • Spring Boot
  • Maven (for dependency management)
  • MongoDB (as the database)
  • Git
  • AWS Account (for deployment)

Project Setup

  1. Clone the repository:

    git clone https://github.com/Radhesham7507/AapalLonar.git
    cd AapalLonar
  2. Configure application properties: Open src/main/resources/application.properties or application.yml and update MongoDB connection details accordingly.

  3. Install dependencies:

    mvn clean install

Run the Project Locally

  1. Start MongoDB Ensure MongoDB is running locally or use a cloud MongoDB service.

  2. Run the Spring Boot application:

    mvn spring-boot:run
  3. Access the API: The application should now be running on http://localhost:8080


API Endpoints

Refer to the API documentation or swagger-ui for available endpoints.

  • Swagger UI (if enabled): http://localhost:8080/swagger-ui.html

Database Configuration With Mongodb

Modify application.properties or application.yml with the correct MongoDB details:

spring.data.mongodb.uri=mongodb://localhost:27017/your_databasegoDB details:

spring.data.mongodb.uri=mongodb://localhost:27017/your_database

If using a cloud-based MongoDB service, replace localhost:27017 with the appropriate connection string.

If using a cloud-based MongoDB service, replace localhost:27017 with the appropriate connection string.

---OR if You Are Using Mysql ---

Database Configuration With MySql

Modify application.properties or application.yml with the correct database details:

spring.datasource.url=jdbc:mysql://localhost:5432/your_database
spring.datasource.username=your_username
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update

Deploying on AWS

1. Create an AWS EC2 Instance

  • Go to AWS Console → EC2 → Launch Instance
  • Choose an OS (Amazon Linux, Ubuntu, etc.)
  • Select instance type (t2.micro for free tier)
  • Configure security group (allow port 8080 for HTTP access)
  • Launch instance and connect via SSH

2. Install Java and Git on EC2

sudo yum update -y
sudo yum install java-17-openjdk -y
sudo yum install git -y

3. Clone the Project on EC2

git clone https://github.com/Radhesham7507/AapalLonar.git
cd AapalLonar

4. Build the Project

mvn clean package

5. Run the Application

java -jar target/*.jar

6. Configure MongoDB (If using MongoDB Atlas)

  • Create a MongoDB Atlas account and cluster
  • Update application.properties with the Atlas connection string

7. Set Up Reverse Proxy (Optional, for domain mapping)

Using NGINX:

sudo yum install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx

Update the NGINX config to proxy requests to localhost:8080.


Contributing

Feel free to contribute by creating issues or submitting pull requests.


About

AapalLonar WebSite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published