A full-stack application for managing parent registrations in an educational institution. The system consists of a React Native frontend and a Spring Boot backend with SQLite database.
- Framework: Spring Boot 2.7.0
- Database: SQLite
- API: RESTful
- Port: 8080
- Framework: React Native
- State Management: React Hooks
- API Integration: Fetch API
- Development Server: Expo
- Name and surname input
- Email validation
- Age input (optional)
- Address input (optional)
- Real-time form validation
- Success/error notifications
- RESTful API endpoints
- Data validation
- Error handling
- Database persistence
- Connection status monitoring
GET /test- Test backend connectionPOST /- Create a new parentGET /- List all parentsGET /{id}- Get parent by ID
CREATE TABLE parents (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
surname TEXT NOT NULL,
email TEXT UNIQUE NOT NULL,
age INTEGER,
address TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)CREATE TABLE students (
id INTEGER PRIMARY KEY AUTOINCREMENT,
parent_id INTEGER,
name TEXT NOT NULL,
birth_date DATE,
grade TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (parent_id) REFERENCES parents(id)
)-
Navigate to backend directory:
cd backend-parents-registration -
Install dependencies:
mvn clean install
-
Run the application:
mvn spring-boot:run
-
Navigate to frontend directory:
cd frontend-parents-registration -
Install dependencies:
npm install
-
Start the development server:
npm start
- Port: 8080 (configurable in
application.properties) - Database: SQLite (automatically created at runtime)
- API URL:
http://localhost:8080(configurable inconfig.ts)
- Start the backend server
- Start the frontend development server
- Open the application in your browser or mobile device
- Fill in the parent registration form
- Submit the form to create a new parent record
- Form validation for required fields
- Network error handling
- User-friendly error messages
- Connection status indicator
- Input validation
- Database error handling
- Proper HTTP status codes
- Detailed error messages
- Input validation on both frontend and backend
- SQL injection prevention through prepared statements
- CORS configuration for API access
- Error message sanitization
- Java 11 or higher required
- Maven for dependency management
- Spring Boot for rapid development
- SQLite for lightweight database
- Node.js required
- Expo for React Native development
- TypeScript for type safety
- React Native for cross-platform development
-
Run unit tests:
mvn test -
Test API endpoints using tools like Postman or curl
- Test form validation
- Test API integration
- Test error handling
- Test connection status
-
Port conflicts
- Solution: Change port in
application.properties
- Solution: Change port in
-
Database connection issues
- Solution: Check database file permissions
-
CORS issues
- Solution: Verify CORS configuration in backend
-
Form submission errors
- Solution: Check network tab in browser dev tools
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or issues, please open an issue in the repository.