E-Bank is a comprehensive banking management application designed to handle customers, accounts, operations, and facilitate interactions through an intelligent chatbot. It consists of two main parts:
- Backend: Built using Spring Boot.
- Frontend: Developed using Angular for the banking interface and React with Vite for the chatbot.
- Manage customers and bank accounts.
- Perform debit, credit, and transfer operations.
- Support for saving and current accounts.
- AI services for managing chatbot interactions.
- Data management with JSON files and dynamic loading.
- Integration with MySQL database.
- Secure API endpoints with Spring Security and JWT.
- User authentication and authorization.
- Customer and account management interface.
- Interactive dashboard with charts for key banking metrics (using Chart.js).
- Views and components to manage the chatbot interface.
- Automatic generation of TypeScript files from backend endpoints.
- Responsive design for multiple devices.
- Java
- Spring Boot
- Hibernate
- Maven
- Angular
- Chart.js
- TypeScript
- Vite
- React
- Spring Security
- JWT
- Docker and Docker Compose
- IntelliJ IDEA for development
The project is organized into two main parts:
- E-Bank (Banking Interface):
- Backend: Spring Boot services for managing customers, accounts, and operations.
- Frontend: Angular-based responsive banking interface.
- E-Bank Chatbot:
- Backend: Java Spring Boot with AI services.
- Frontend: React with Vite for chatbot interface.
- Persistent data storage in JSON files.
- Clone the repository:
git clone https://github.com/ayman-gassi/E-Bank.git
git clone https://github.com/thejokers69/E-Bank.git (forked)
cd E-Bank
- Build the backend:
cd backend
./mvnw clean install
./mvnw spring-boot:run
- Start the frontend:
cd frontend
npm install
npm start
- Clone the repository:
git clone https://github.com/thejokers69/E-Bank-Chatbot.git
cd E-Bank-Chatbot
- Build the backend:
cd backend
./mvnw clean install
./mvnw spring-boot:run
- Start the chatbot frontend:
cd src/main/frontend
npm install
npm run dev
- Launch via Docker Compose (optional):
docker-compose up
The banking interface uses a MySQL database. Ensure you have MySQL installed and running. Update the application.properties file accordingly.
To set up the PostgreSQL database for the chatbot:
- Run Docker Compose:
docker-compose up -d
- Access the database container:
docker ps
docker exec -i <container_id> psql -U admin -d cv_store
- Execute the following commands in PostgreSQL:
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS vector_store (
id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
content text,
metadata json,
embedding vector(1536) -- 1536 is the default embedding dimension
);
CREATE INDEX ON vector_store USING HNSW (embedding vector_cosine_ops);
- Set up the database manually:
psql -U your-username
- Create a database:
CREATE DATABASE cv_store;
- Create a user and grant permissions:
CREATE USER admin WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE cv_store TO admin;
- Update the application.properties file:
spring.datasource.url=jdbc:postgresql://localhost:5432/cv_store
spring.datasource.username=admin
spring.datasource.password=password
spring.jpa.hibernate.ddl-auto=update
- Dashboard
- Home Page
- Chatbot Page
- Database Screenshot
Please read the CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Banking Interface: Ayman Gassi
- Chatbot: Mohamed Lakssir
E-Bank Chatbot is a project aimed at developing a web application to facilitate interactions with a virtual bank via an intelligent chatbot. This project combines a Java backend with Spring Boot and a React frontend with Vite.
- Project Structure
- Main Content
- Important Files and Folders
- Screenshots
- Commands Used
- Technologies Used
- How to Start the Project
- Prerequisites
- Database Configuration
- Contributing
- License
- Author
The project is organized into two main parts:
- Backend: Developed in Java with Spring Boot, it contains the main services, REST controllers, and necessary configurations.
- Frontend: Built with TypeScript, Vite, and React, it provides an interactive and responsive user interface.
- AI services for managing chatbot interactions.
- Data management with JSON files and dynamic loading.
- REST API for communication with the frontend.
- Automatic generation of TypeScript files from backend endpoints.
- Views and components to manage the user interface.
- Integration with the backend via generated files.
compose.yaml
: Docker Compose configuration file.pom.xml
: Maven configuration for the Java project.package.json
: Frontend dependency management.application.properties
: Spring Boot properties configuration.prompts/
: Prompt templates for chatbot AI management.store/
: Persistent data storage in JSON files.
git init
git remote add origin https://github.com/thejokers69/E-Bank-Chatbot.git
git add .
git commit -m "Initial commit for E-Bank-Chatbot"
git push -f origin master
- Java
- Spring Boot
- Maven
- TypeScript
- Vite
- React
- Docker and Docker Compose
- IntelliJ IDEA for development
- Clone the repository:
git clone https://github.com/thejokers69/E-Bank-Chatbot.git
cd E-Bank-Chatbot
- Build the backend:
cd backend
./mvnw clean install
./mvnw spring-boot:run
- Start the frontend:
cd src/main/frontend
npm install
npm run dev
- Launch via Docker Compose (optional):
docker-compose up
- Java 11 or higher
- Node.js 14 or higher
- Docker (optional)
To set up the PostgreSQL database for the E-Bank Chatbot project, follow these steps:
- Ensure you have PostgreSQL installed and running on your system.
- Have access to a PostgreSQL client (e.g., psql CLI or a GUI tool like pgAdmin).
- Login to PostgreSQL: Use your PostgreSQL user account to log in. Replace your-username with your PostgreSQL username:
psql -U your-username
- Create a Database: Run the following command to create a new database for the project:
CREATE DATABASE cv_store;
- Create a User: Create a new PostgreSQL user with a password. Replace thejoker with the desired username and sexcigarez2 with a secure password:
CREATE USER admin WITH PASSWORD 'password';
- Grant Permissions: Grant all privileges on the database to the created user:
GRANT ALL PRIVILEGES ON DATABASE cv_store TO admin;
- Connect to the Database: Use the following command to switch to the newly created database:
\c cv_store
- Create Tables (Optional): If you need to manually create the tables (e.g., Person table), use SQL scripts similar to the following:
CREATE TABLE person (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE
);
Ensure the application.properties file in the project is correctly configured to connect to your PostgreSQL database. Here’s an example configuration:
spring.datasource.url=jdbc:postgresql://localhost:5432/cv_store
spring.datasource.username=admin
spring.datasource.password=password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
Once the database is set up and the application properties are updated, test the connection by running the backend service:
./mvnw spring-boot:run
If the connection is successful, the application will automatically initialize the required tables and data as per the Person entity configuration.
Please read the CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Mohamed Lakssir 2ACI Info