Student API is a full-stack project that helps manage student, teacher and class information. It supports CRUD operations (Create, Read, Update, Delete) for students, teachers and classes with a React frontend for easy interaction.
This is my first backend Go project! I made it to learn Go while building something practical it is a simple API that manages student info like name, email and age. No AI was used in building backend of this project.
I also built a React frontend to visualize and interact with the data, making it a complete full-stack application.
It's a full-stack CRUD application that lets you:
- Create, read, update, and delete students
- Create, read, update, and delete teachers
- Create, read, update, and delete classes
- Associate students with teachers and classes
- View all data through a clean React interface
- User starts the backend server (Go + SQLite)
- User starts the frontend dev server (React)
- User interacts with the web interface to manage data
- Frontend sends API requests to backend
- Backend handles CRUD operations with SQLite database
├── cmd/
│ └── student-api/
│ └── main.go # Go application entry point
│
├── config/
│ └── local.yaml # Configuration file
│
├── internal/
│ ├── config/
│ │ └── config.go # Config loading logic
│ │
│ ├── http/
│ │ ├── handlers/
│ │ │ ├── auth/
│ │ │ │ └── auth.go # Auth handlers
│ │ │ ├── class/
│ │ │ │ └── class.go # Class CRUD handlers
│ │ │ ├── student/
│ │ │ │ └── student.go # Student CRUD handlers
│ │ │ └── teacher/
│ │ │ └── teacher.go # Teacher CRUD handlers
│ │ │
│ │ └── middleware/
│ │ └── auth.go # Auth middleware
│ │
│ ├── storage/
│ │ ├── sqlite/
│ │ │ └── sqlite.go # SQLite database implementation
│ │ └── storage.go # Storage interface
│ │
│ ├── types/
│ │ └── types.go # Data types and models
│ │
│ └── utils/
│ └── response/
│ └── response.go # API response utilities
│
└── web/
├── public/
│ ├── favicon.svg
│ └── icons.svg
│
├── src/
│ ├── assets/
│ │ ├── hero.png
│ │ ├── react.svg
│ │ └── vite.svg
│ │
│ ├── components/
│ │ ├── ui/
│ │ │ ├── badge.jsx
│ │ │ ├── button.jsx
│ │ │ ├── card.jsx
│ │ │ ├── dialog.jsx
│ │ │ ├── input.jsx
│ │ │ ├── label.jsx
│ │ │ ├── select.jsx
│ │ │ ├── sonner.jsx
│ │ │ └── table.jsx
│ │ └── Layout.jsx
│ │
│ ├── lib/
│ │ ├── api.js # API client
│ │ └── utils.js
│ │
│ ├── pages/
│ │ ├── AuthPage.jsx
│ │ ├── Classes.jsx
│ │ ├── Dashboard.jsx
│ │ ├── Students.jsx
│ │ └── Teachers.jsx
│ │
│ ├── App.jsx
│ ├── index.css
│ └── main.jsx
│
├── .env.example
├── .gitignore
├── components.json
├── eslint.config.js
├── index.html
├── jsconfig.json
├── package.json
├── pnpm-lock.yaml
└── vite.config.js
- Runtime: Go
- Framework: Standard library + net/http
- Database: SQLite
- Configuration: YAML
- Framework: React
- Build Tool: Vite
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- HTTP Client: Axios
- Containerization: Docker
- Backend: Written entirely by me, no AI assistance used.
- Frontend:
- Used AI to build frontend components
- Provided direction about UI/UX design
- AI helped with downloading and setting up shadcn/ui
- AI reviewed frontend code
- Refactoring: Used AI for code refactoring assistance
-
Clone the repository:
git clone github.com/rusilkoirala/student-api
-
Create the database directory and file:
mkdir -p storage touch storage/storage.db
-
Run the backend from the project root:
go run cmd/student-api/main.go -config config/local.yaml
The backend should now be running.
-
Navigate to the frontend directory:
cd web -
Install dependencies:
npm install # or pnpm install -
Start the development server:
npm run dev # or pnpm dev -
Open your browser and go to
http://localhost:5173
You can run the backend in a container with a production-friendly setup:
docker build -t student-api .
docker run --rm -p 3000:3000 \
-e CONFIG_PATH=/app/config/local.yaml \
-v "$PWD/storage:/app/storage" \
student-apiThank you!

