AI-labar is a fast and convenient ways to get the opinion of people on various topics, implemented in Angular/Java
- It is highly recommended to use Visual Studio Code for the frontend development and IntelliJ IDEA for the backend development.
- Ensure that you have Node.js installed, which you can download from nodejs.org.
- Globally install Angular CLI by running
npm install -g @angular/cli
. - Ensure you have Java 11 installed on your system. You can check the Java version by running
java -version
in the command line. - Install Maven 3.5.4 or a compatible version. You can download it from the official Apache Maven website (https://maven.apache.org/download.cgi).
- Download and install Visual Studio Code from Visual Studio Code. (Recommended)
- Download and install IntelliJ IDEA from IntelliJ IDEA. (Recommended)
- Clone or download this repository to your local development environment.
- Open a terminal and navigate to the location where you want to clone the repository for your application.
- Execute the following command to clone the repository from your version control server (e.g., GitHub):
git clone <Repository_URL>
- Open the
Backend/ai-labar/src/main/resources/application.properties
file. - Configure the database connection properties. Here's an example for an embedded H2 database:
# postgres configuration
spring.datasource.url=jdbc:postgresql://localhost:5432/ai_labar
spring.datasource.username=postgres
spring.datasource.password=password
spring.datasource.driver-class-name=org.postgresql.Driver
For the creation of the database in Postgres, please review the file Create Tables
- Open a terminal and navigate to the root directory of your Spring Boot project.
- Execute the following command to build and run the backend:
mvn clean install -Dmaven.test.skip=true
mvn spring-boot:run -Dmaven.test.skip=true
The backend should now be up and running at http://localhost:8080.
- Open IntelliJ IDEA and navigate to the backend project folder.
- Import the project as a Maven project.
- Ensure that the application server configuration is correctly set up (e.g., Tomcat).
- Configure the database connection if needed in the
application.properties
file. - Run the Spring Boot application from IntelliJ IDEA.
- Open a terminal in the Angular project folder.
- Run the following commands to install dependencies and build the frontend:
npm install
ng serve
The frontend will be accessible at http://localhost:4200.
- Open Visual Studio Code and navigate to the frontend project folder.
- Open an integrated terminal in Visual Studio Code.
- Run
npm install
to install project dependencies. - Edit the API configuration in the code to point to the Spring Boot backend if necessary.
- Run
ng serve
to start the Angular development server. The application will be available athttp://localhost:4200
.
TODO
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Copyright © 2023 The Phrontistery
Licensed under the MIT License MIT