Click on the images to view on YouTube.
A project designed to help users practice the Java Streams API. This project is built using Spring Boot for the backend and React (with Vite) for the frontend.
- Interactive exercises practice Java Streams.
- Spring Boot backend with REST APIs.
- React frontend built using Vite for fast development and optimized builds.
- Email/password registration and login functionality.
- Spring Security integrated with OAuth2 login via Google and GitHub.
- JWT-based authentication with stateless session management.
- MySQL for data persistence with Spring Data JPA.
- Backend: Spring Boot, Spring Security, Spring Data JPA, OAuth2 (Google, GitHub), JWT
- Frontend: React, Vite
- Database: MySQL
- Build Tools: Maven (for Spring Boot)
- Other: Docker
-
Clone the repository:
git clone https://github.com/4121nnn/javastreams.git
-
Navigate to the project directory:
cd javastreams
-
Backend Setup (Spring Boot):
- Ensure you have Java (version 17 or above) installed.
- Create a MySQL database:
CREATE DATABASE streams;
- Configure your
application.yml
orapplication.properties
with your MySQL credentials:
spring: datasource: url: jdbc:mysql://localhost:3306/streams username: your_username password: your_password jpa: hibernate: ddl-auto: update
- Run the following commands to start the backend:
./mvnw spring-boot:run
-
Frontend Setup (React + Vite):
- Navigate to the
frontend
folder:
cd frontend
- Install dependencies and start the frontend:
npm install npm run dev
- Navigate to the
-
The application will be accessible at
http://localhost:3000
.
- JWT Authentication: The project uses JSON Web Tokens (JWT) to secure API requests and enforce stateless session management.
- Email/Password Authentication: Users can register and log in using their email and password. Upon successful authentication, JWT tokens are issued.
- OAuth2 Login: Users can also log in via Google and GitHub OAuth2 providers. Upon successful login, JWT tokens are issued.