Skip to content

404Meet/student-survey-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Survey — Spring Boot API 📝☕️

Spring Boot Java MySQL Flyway Angular Vue.js

Frontend Repos:

A Spring Boot REST API that powers a Student Survey application. The API supports CRUD operations for survey submissions, persists data to MySQL, and uses Flyway migrations (schema + stored procedures). Designed to be consumed by both the Angular and Vue.js frontends.


Features

  • ✅ RESTful CRUD API for survey submissions (/api/surveys)
  • MySQL persistence with Flyway migrations (tables + procedures)
  • ✅ Input validation + clean request/response DTO-style payloads
  • CORS enabled for frontend integration
  • ✅ Supports local dev, AWS RDS, or containerized MySQL via env config

Tech Stack

  • Java 21
  • Spring Boot 3.5.x
  • MySQL
  • Flyway (migrations + stored procedures)
  • JdbcTemplate / SimpleJdbcCall (DAO layer)
  • Maven

Project Structure (High-Level)

  • controller/ — REST endpoints (survey CRUD)
  • service/ — business logic
  • dao/ — DB access (JdbcTemplate / SimpleJdbcCall)
  • model/ — entities / DTOs
  • resources/db/migration/ — Flyway SQL migrations

API Endpoints

Base path: /api/surveys

  • GET /api/surveys — list all surveys
  • GET /api/surveys/{id} — get by id
  • POST /api/surveys — create survey
  • PUT /api/surveys/{id} — update survey
  • DELETE /api/surveys/{id} — delete survey

Getting Started

1) Prerequisites

  • Java 21
  • Maven
  • MySQL (local / Docker / AWS RDS)

2) Configure Environment Variables (Recommended)

Required

  • DB_HOST
  • DB_PORT
  • DB_NAME
  • DB_USER
  • DB_PASSWORD

Optional

  • SERVER_PORT (default depends on your config)
  • CORS_ORIGINS (e.g., http://localhost:4200,http://localhost:5173)

macOS / Linux

export DB_HOST="localhost"
export DB_PORT="3306"
export DB_NAME="student_survey"
export DB_USER="root"
export DB_PASSWORD="password"
export CORS_ORIGINS="http://localhost:4200,http://localhost:5173"

#### Windows
$env:DB_HOST="localhost"
$env:DB_PORT="3306"
$env:DB_NAME="student_survey"
$env:DB_USER="root"
$env:DB_PASSWORD="password"
$env:CORS_ORIGINS="http://localhost:4200,http://localhost:5173"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages