Welcome to the Local4LocalEU project! 'Localforlocal' project evolved into the 'Gemeentepassen' project. This README provides all the necessary instructions to set up and run the application on your local machine.
The repository for the 'Gemeentepassen' project is here: https://github.com/CentricEU/local4local.
The project is founded by the EU NGI Program.
The project is composed of:
- Frontend: Angular
- Backend: Spring Boot
- Database: PostgreSQL
Before starting, ensure you have the following installed on your machine:
- Node.js: Version 20.11.1 or higher (Download Node.js)
- Angular CLI: Version 18.1.0 or higher (Install Angular CLI)
- Java Development Kit (JDK): Version 21 (Download JDK)
- PostgreSQL: Version 12 or higher (Download PostgreSQL)
- AWS Account: A valid AWS account to configure the AWS CLI (Create an AWS Account)
-
Select the development branch.
-
Run the following commands:
git clone https://github.com/CentricEU/Local4Local.git cd Local4Local
-
Ensure PostgreSQL is running.
-
Create a new database in PostgreSQL, e.g.,
local4localEU. -
Update your PostgreSQL credentials in the
application.propertiesorapplication.ymlfile located inbackend/src/main/resources/:spring.datasource.url=jdbc:postgresql://localhost:5432/local4localEU spring.datasource.username=your_username spring.datasource.password=your_password
-
Set Up the
.awsFoldera. Install AWS CLI if you haven't already:
- Download and install the AWS CLI from the AWS CLI installation page.
b. Configure the AWS CLI: - Run the following command in your terminal to configure the AWS CLI with your credentials:
aws configure
- During configuration, you will be prompted to enter your:
- AWS Access Key ID
- AWS Secret Access Key
- Default region name (e.g.,
us-east-1) - Default output format (e.g.,
json)
c. The
.awsfolder will be created in your user directory, typically atC:/Users/your_username/.awson Windows, or~/.awson macOS/Linux.d. Ensure that your AWS credentials are properly configured by checking the folder and files at:
C:/Users/your_username/.aws/credentialsC:/Users/your_username/.aws/config
- Open the
backendfolder in your IDE. - Build and run the Spring Boot project.
- The backend service will now be running at http://localhost:8080.
cd frontendnpm install📋 Note: If you encounter issues with dependency conflicts, try running:
npm install --legacy-peer-depsnpm start- The frontend should now be running at http://localhost:4200.
- Ensure that both the backend and frontend servers are running.
- Open your browser and navigate to http://localhost:4200.
- The frontend should now be connected to the backend and ready to use.
- Database Connection Error: Ensure PostgreSQL is running and the credentials in
application.propertiesare correct. - Port Conflicts: Verify that port
8080is free or update the port inapplication.properties.
- Dependency Errors: Run
npm installto ensure all dependencies are installed. - Port Conflicts: Verify that port
4200is free or update the Angular CLI configuration.