Classify is a full-stack web application designed to serve as a modern helper tool for college students. It features a secure authentication system built with a robust Spring Boot backend and an interactive, responsive frontend powered by React.
Here's a glimpse of the Classify application.
- Secure User Authentication: Safe and secure user sign-up and login functionality using Spring Security.
- JWT-based Authorization: Stateless API secured with JSON Web Tokens for authenticated user sessions.
- Responsive Frontend: A clean and modern UI built with React that works seamlessly across different devices.
- RESTful API: A well-structured backend API for handling all application logic.
- Java 17+
- Spring Boot: For building the REST API.
- Spring Security: For handling authentication and authorization.
- MySQL: As the relational database for storing user data.
- Maven: For project dependency management.
- React: For building the user interface.
- Vite: As the frontend build tool and development server.
- CSS: For styling the application.
- Context API: For state management.
Follow these instructions to get a local copy up and running.
Make sure you have the following installed on your machine:
- Java JDK 17 or later
- Apache Maven
- Node.js and npm
- MySQL Server
- A Git client (Git SCM)
git clone [https://github.com/vanshmehandru/Classify.git](https://github.com/vanshmehandru/Classify.git)
cd Classify-
Open your MySQL client (like MySQL Workbench or the command-line interface).
-
Run the following SQL commands to create the database and a dedicated user.
CREATE DATABASE classifydb CHARACTER SET utf8mb4; CREATE USER 'classify'@'%' IDENTIFIED BY 'StrongPassword123!'; GRANT ALL PRIVILEGES ON classifydb.* TO 'classify'@'%'; FLUSH PRIVILEGES;
-
Navigate to the backend directory.
cd classify-backend -
The backend is already configured to connect to the database via the
src/main/resources/application.ymlfile. When the application starts, it will automatically create the necessaryuserstable fromsrc/main/resources/schema.sql. -
Run the Spring Boot application using the Maven wrapper.
On Windows (PowerShell or CMD):
./mvnw.cmd spring-boot:run
On macOS/Linux:
./mvnw spring-boot:run
The backend server will start on
http://localhost:8080. Leave this terminal running.
- Open a new terminal and navigate back to the project's root directory.
# If you are in classify-backend, go back one level cd ..
- Install the required
npmpackages.npm install
- Create an environment file to tell the frontend where the backend API is. Create a new file named
.envin the root directory and add the following line:VITE_API_BASE_URL=http://localhost:8080 - Start the Vite development server.
Your frontend application will now be running and accessible at
npm run dev
http://localhost:5173(or another port if 5173 is busy).
You can now open the application in your browser and use the Sign-Up and Login features!