A full-stack web application for student registration with a React frontend and Spring Boot backend.
The application is currently configured to run without database dependencies for easy development and testing. All data is stored in memory and will be reset when the application restarts.
EasyCRUD/
βββ backend/ # Spring Boot Backend
β βββ src/main/java/
β β βββ com/student/registration/
β β βββ student_registration_backend/
β β βββ controller/ # REST Controllers
β β βββ model/ # Data Models
β β βββ config/ # Configuration
β βββ src/main/resources/
β β βββ application.properties # App Configuration
β βββ database_schema.sql # Complete Database Schema
β βββ simple_schema.sql # Minimal Database Schema
β βββ DATABASE_SETUP.md # Database Setup Guide
β βββ pom.xml # Maven Dependencies
βββ frontend/ # React Frontend
βββ src/
β βββ components/ # React Components
β βββ api/ # API Service
β βββ hooks/ # Custom Hooks
βββ package.json # Node Dependencies
- Java 17 or higher
- Node.js 16 or higher
- Maven (or use the included Maven wrapper)
-
Navigate to backend directory:
cd backend -
Build the application:
# Make Maven wrapper executable (first time only) chmod +x mvnw # Build the project ./mvnw clean package
-
Run the application:
# Using Maven ./mvnw spring-boot:run # Or using the JAR file java -jar target/student-registration-backend-0.0.1-SNAPSHOT.jar
The backend will start on http://localhost:8080
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will start on http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/register |
Register a new student |
| GET | /api/users |
Get all students |
| DELETE | /api/users/{id} |
Delete a student by ID |
# Register a new student
curl -X POST http://localhost:8080/api/register \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com",
"course": "Computer Science",
"studentClass": "Final Year",
"percentage": 85.5,
"branch": "Computer Engineering",
"mobileNumber": "+1234567890"
}'
# Get all students
curl http://localhost:8080/api/users
# Delete a student
curl -X DELETE http://localhost:8080/api/users/1- β No database dependencies - Application runs independently
- β In-memory storage - Data persists during runtime
- β Ready for database integration - Schema files provided
The project includes comprehensive database schemas:
-
database_schema.sql- Complete schema with:- Users table with all fields
- Courses and branches tables
- User roles and permissions
- Audit logging
- Sample data (10 students, 6 courses, 5 branches)
-
simple_schema.sql- Minimal schema with:- Basic users table
- Sample data (5 students)
-
DATABASE_SETUP.md- Complete setup guide
-
Install MariaDB:
sudo apt update && sudo apt install mariadb-server -y -
Secure the installation:
sudo mysql_secure_installation
-
Create database and user:
sudo mysql -u root -p
CREATE DATABASE student_db; GRANT ALL PRIVILEGES ON student_db.* TO 'username'@'localhost' IDENTIFIED BY 'your_password'; FLUSH PRIVILEGES; EXIT;
-
Import the schema:
mysql -u username -p student_db < database_schema.sql
When ready to add database support:
-
Add dependencies to
pom.xml:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> <scope>runtime</scope> </dependency>
-
Update
application.properties:spring.datasource.url=jdbc:mariadb://localhost:3306/student_db spring.datasource.username=your_username spring.datasource.password=your_password spring.jpa.hibernate.ddl-auto=validate spring.jpa.show-sql=true
-
Restore JPA annotations in User.java:
@Entity @Data public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; // ... other fields }
-
Recreate UserRepository.java:
@Repository public interface UserRepository extends JpaRepository<User, Long> { }
When using database, set these environment variables:
export DB_HOST=localhost
export DB_USER=your_username
export DB_PASS=your_password
export DB_PORT=3306
export DB_NAME=student_dbKey configuration options in application.properties:
# Server Configuration
server.port=8080
# Database Configuration (when enabled)
spring.datasource.url=jdbc:mariadb://localhost:3306/student_db
spring.datasource.username=${DB_USER:root}
spring.datasource.password=${DB_PASS:}
spring.jpa.hibernate.ddl-auto=validate
spring.jpa.show-sql=truecd backend
./mvnw test# Test registration
curl -X POST http://localhost:8080/api/register \
-H "Content-Type: application/json" \
-d '{"name":"Test User","email":"test@example.com","course":"CS","studentClass":"First Year","percentage":85.0,"branch":"Computer Engineering","mobileNumber":"+1234567890"}'
# Test retrieval
curl http://localhost:8080/api/users- β Student registration form
- β View all registered students
- β Delete students
- β Responsive UI design
- β Form validation
- β In-memory data storage
- π Persistent data storage
- π User authentication
- π Role-based access control
- π Data export/import
- π Advanced search and filtering
- π Audit logging
-
Maven build fails:
- Ensure Java 17+ is installed
- Check if Maven wrapper is executable:
chmod +x mvnw
-
Port already in use:
- Change port in
application.properties:server.port=8081
- Change port in
-
Frontend can't connect to backend:
- Check CORS configuration in
WebConfig.java - Verify backend is running on correct port
- Check CORS configuration in
-
Database connection issues:
- Verify MariaDB service is running:
sudo systemctl status mariadb - Check credentials and permissions
- Ensure database exists:
SHOW DATABASES;
- Verify MariaDB service is running:
DATABASE_SETUP.md- Complete database setup guidedatabase_schema.sql- Full database schema with sample datasimple_schema.sql- Minimal database schema for quick setup
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
For issues and questions:
- Check the troubleshooting section
- Review the database setup guide
- Check application logs for error messages
- Verify all prerequisites are installed