This application is a simple accounting information system built with a Go backend using immudb, and a React frontend with Material-UI. It allows users to add and view account information.
Before you begin, ensure you have the following installed on your system:
- Docker
- Docker Compose
If you just want to run the application and play around with it, follow these simple steps:
-
Clone the repository:
git clone <repository-url> cd <repository-folder>
-
Start the application using Docker Compose:
docker-compose up
-
Wait for the containers to start up. You should see logs indicating that the services are running.
-
Open your web browser and go to
http://localhost:3000
-
You can now use the application:
- Use the form to add new account information
- View the list of accounts in the table below the form
-
When you're done, stop the application by pressing
Ctrl+C
in the terminal where Docker Compose is running
That's it! You can now explore the application and its features.
If you want to set up the application for development, follow these more detailed steps:
-
Clone the repository:
git clone <repository-url> cd <repository-folder>
-
Create a
.env
file in thefrontend
directory with the following content:VITE_API_URL=http://localhost:8080
-
Build and run the Docker containers:
docker-compose up --build
-
Wait for the containers to start up. You should see logs indicating that the services are running.
-
Access the application:
- Frontend: Open your browser and go to
http://localhost:3000
- Backend API: Available at
http://localhost:8080
- Swagger: Available at
http://localhost:8080/swagger/index.html#/
- Frontend: Open your browser and go to
The project is organized into three main components:
backend/
: Contains the Go backend codefrontend/
: Contains the React frontend codedocker-compose.yml
: Defines the multi-container Docker application
The backend is built with Go and uses the following main dependencies:
- Gin: Web framework
- immudb: Immutable database for storing account information
The frontend is built with React and Vite, and uses the following main dependencies:
- Material-UI: For styling and UI components
- Axios: For making HTTP requests to the backend
Once the application is running:
- Open your web browser and navigate to
http://localhost:3000
. - Use the form to add new account information:
- Enter the account number, name, IBAN, address, and amount
- Select the account type (sending or receiving)
- Click the "Add Account" button to submit the information
- View the list of accounts in the table below the form:
- The table displays all entered accounts with their details
- The table is automatically updated when new accounts are added
To make changes to the application:
- Stop the running containers with
Ctrl+C
ordocker-compose down
. - Make your changes to the backend or frontend code:
- Backend: Modify the Go files in the
backend/
directory - Frontend: Update the React components in the
frontend/src/
directory
- Backend: Modify the Go files in the
- Rebuild and run the containers with
docker-compose up --build
. - Test your changes in the browser at
http://localhost:3000
.