Developer Documentation - s566466div/GDP-Project-EduLearn-03 GitHub Wiki
Project Setup and Developer Documentation
1. Tools/Services Used
Below is a list of all tools, libraries, and services required for the project, along with a brief description of their purpose:
- Node.js and npm: Used for managing dependencies and running the application.
- React: JavaScript library for building the frontend user interface.
- Spring Boot: Java-based framework for building the backend API.
- SQL Database: Used for data persistence; currently configured for MySQL.
- Playwright: Framework for testing the application’s frontend functionality.
2. Directions to Set Up a Development Environment
Follow these steps to set up the environment from scratch:
1. Install Prerequisites
Install the following prerequisites:
- Node.js (version V23.1.0): Node.js download link
- Java (JDK 17 or later) for Spring Boot: Java download link
- MySQL (version X.X) or another SQL database: MySQL download link
2. Clone the Project Repository
Clone the project repository and navigate to the project folder:
git clone <repository-url>
cd <project-folder>
3. Configure Environment Variables
Create a .env
file in both the frontend and backend directories (if applicable). Use the following examples for guidance:
Frontend .env
:
REACT_APP_API_URL=http://localhost:5050/api
Backend .env
:
DB_URL=jdbc:mysql://localhost:3306/db_name
DB_USER=root
DB_PASSWORD=yourpassword
4. Install Dependencies
Install the required dependencies for both the frontend and backend.
-
For the frontend:
cd frontend npm install -g [email protected] npm install
-
For the backend:
cd backend ./mvnw install
-
For Testing
cd frontend npm install @playwright/test --save-dev
3. Directions to Run the Code for Testing
Follow these instructions to run the application and set up testing.
1. Start the Backend
Navigate to the backend directory and start the server:
cd backend
./mvnw spring-boot:run
2. Start the Frontend
Navigate to the frontend directory and start the application:
cd frontend
npm run start
3. Running Tests
To run the tests for both the frontend and backend, follow the steps below.
-
Frontend Tests (using Playwright):
cd frontend npx playwright test
-
Backend Tests:
cd backend ./mvnw test
4. Instructions for Using Developer Accounts
If the project requires connecting to third-party services, configure the environment settings to use personal credentials.
- Database Configuration: If using a hosted SQL database, update
DB_URL
,DB_USER
, andDB_PASSWORD
in the.env
file with your database instance details.