AuthShield is a hobby and learning-oriented authentication project built using Spring Boot for the backend, React.js for the frontend, and MySQL as the database. It implements features such as signup/login, JWT authentication, email verification, and password reset. It can be useful for students and learners who want a basic authentication setup so they can focus on building core application features without spending too much time on security implementation.
- Frontend: HTML, CSS, React.js
- Backend: Spring Boot, Spring Security
- Database: MySQL
- The frontend UI is developed using React
- For deployment, the React application is built and served by the Spring Boot backend as static files
- The React production build files are placed inside the backend’s static directory
- The
staticfolder contains the React production build files - The
templatesfolder insidestaticis used to store email templates- Used for email verification and password reset
git clone https://github.com/Mohamed-Imran-12/AuthShield.gitOpen the project in IntelliJ IDEA / Eclipse
Open pom.xml and allow Maven to download dependencies
spring.datasource.url=your_DB_URL
spring.datasource.username=your_DB_USERNAME
spring.datasource.password=your_DB_PASSWORDapiKey=your_BREVO_MAIL_APIRun AuthShieldApplication.java
http://localhost:8080/
-
Email functionality works only with Brevo API.
To use another mail provider, update mail-related code inmailServices.java. -
The
ADMINrole is manually assigned directly in the database. This is intentional to maintain higher security and prevent unauthorized users from registering as admins.
Do not edit files inside the backend static folder directly.
cd "frontend src"
npm install
npm run devThis starts the React development server for UI changes.
cd "frontend src"
npm run buildstatic/
├── assets/
│ ├── *.css
│ ├── *.js
├── index.html
Steps:
- Delete old
index.htmland files insideassets - Copy new build files from
dist - Paste them into backend
staticdirectory





