VIT-AP University Students Can Use This Spring Boot REST API Starter Scorecard

VIT-AP University Students Can Use This Spring Boot REST API Starter Scorecard

Facebook
Twitter
LinkedIn
WhatsApp
Email

Yes, you can grade a beginner Spring Boot REST API yourself, and the scorecard below shows how. It awards 100 points across four areas: endpoints, validation, error handling and tests. Score honestly, fix the cheapest gaps first, and only then take the project to a mentor or reviewer.

Why a scorecard beats “it runs on my machine”

Most first Spring Boot projects reach the same stage: the application starts, Postman returns JSON, and the student considers it done. A reviewer will then send a blank field, a duplicate ISBN, or a request for a record that does not exist, and the API answers with a 500 error and a stack trace. That gap between “works for the happy path” and “behaves predictably” is what this scorecard measures.

The scorecard is deliberately narrow. It does not judge your UI, your deployment, your database tuning or your security setup. It judges the four things a mentor can check in ten minutes with a REST client and a terminal:

  • Endpoints (30 points): is the API shaped like a REST API?
  • Validation (25 points): does it reject bad input before it reaches the database?
  • Error handling (25 points): do failures produce clear, consistent responses?
  • Tests (20 points): can someone else change the code and know quickly whether they broke it?

The 100-point Spring Boot REST API starter scorecard

Give each row a score from zero up to its maximum. Use the descriptions as anchors: full marks only if the behaviour is present and you have demonstrated it, not merely written the code.

Area Criterion Max Full marks look like
Endpoints (30) Resource-based URLs 6 Plural nouns such as /api/books, no verbs like /getAllBooks
Correct HTTP methods 6 GET reads, POST creates, PUT or PATCH updates, DELETE removes
Correct status codes 6 201 on create (with a Location header ideally), 200 on read, 204 on delete, 404 when missing
DTOs, not entities 6 Request and response classes are separate from JPA entities
Layering 3 Controller calls service, service calls repository; no database logic in controllers
Pagination on list endpoints 3 List endpoint accepts page and size parameters
Validation (25) Bean Validation annotations 7 @NotBlank, @Size, @Min, @Pattern on request DTOs
@Valid actually applied 6 Controller parameters are annotated so rules fire
Business-rule checks 6 Duplicate ISBN, borrowing an unavailable copy and similar rules are enforced in the service layer
Path and query parameter checks 3 Invalid IDs or page sizes are rejected cleanly
Useful validation messages 3 Each message names the field and the problem
Error handling (25) Global handler 7 One @RestControllerAdvice class maps exceptions to responses
Custom exceptions 5 Examples: BookNotFoundException, DuplicateIsbnException
Consistent error body 6 Same JSON shape every time: timestamp, status, error, message, path
No leaked internals 4 No stack traces or SQL text in responses
Malformed request handling 3 Bad JSON or wrong types return 400, not 500
Tests (20) Service unit tests 6 Business rules tested with mocked repositories
Controller slice tests 6 MockMvc tests check status codes and JSON for success and failure
Negative-path coverage 4 At least one test each for validation failure and not-found
Tests pass from a clean build 2 mvn test or gradle test passes on a fresh clone
Readable test names 2 A name like returns404WhenBookDoesNotExist explains the intent

How to interpret your total

  • 0 to 39: a working prototype. Focus on status codes and a global exception handler first; they are the quickest wins.
  • 40 to 64: a solid beginner project. Add validation depth and negative-path tests.
  • 65 to 84: ready for mentor review. Remaining gaps are likely pagination, error body consistency or slice tests.
  • 85 to 100: strong starter work. Extend into security, API documentation and database migrations as a next step.

These bands are this guide’s own rule of thumb, not an industry standard.

Free 2-Week CareerSwami Internship

Online, 14 days, with a free offer letter and a free completion certificate once you finish the work. Check with your college that it fits your requirement before you enrol.

Apply for the free internship

Scored example: a library-management API, graded line by line

Illustrative only. This is a hypothetical student project, and no code or tests were run to produce these numbers.

Imagine a student builds a library API with these resources: /api/books, /api/members and /api/loans. A member can borrow a book, return it, and list overdue loans. Here is how an honest self-grade might look.

Endpoints: 21 of 30

  • Resource URLs: 6/6. All nouns, all plural.
  • HTTP methods: 5/6. Returning a book uses POST /api/loans/{id}/return, which is defensible, but the student also left GET /api/books/delete/{id} in from an early draft. One point lost.
  • Status codes: 3/6. Create returns 200 instead of 201, and delete returns 200 with an empty body instead of 204.
  • DTOs: 4/6. Books and members use DTOs, but loans return the entity directly, exposing the nested member object.
  • Layering: 3/3.
  • Pagination: 0/3. GET /api/books returns every row.

Validation: 15 of 25

  • Annotations: 6/7. Title and ISBN are checked, but copiesAvailable can go negative at creation time.
  • @Valid applied: 6/6.
  • Business rules: 3/6. A member cannot borrow the same book twice, but nothing stops borrowing when zero copies remain.
  • Path and query checks: 0/3.
  • Messages: 0/3. Responses show the default framework text, not field-specific messages.

Error handling: 14 of 25

  • Global handler: 5/7. It exists but covers only not-found.
  • Custom exceptions: 3/5. BookNotFoundException exists, but member and loan lookups throw generic runtime exceptions.
  • Consistent body: 3/6. Not-found has a tidy JSON body; validation errors use a different default shape.
  • No leaked internals: 3/4. Most responses are clean, but a database constraint failure still surfaces a raw message.
  • Malformed requests: 0/3.

Tests: 8 of 20

  • Service unit tests: 4/6. Borrow logic is tested; return logic is not.
  • Controller slice tests: 2/6. Only the book list endpoint has a MockMvc test.
  • Negative paths: 0/4.
  • Clean build: 2/2.
  • Readable names: 0/2. Tests are named test1, test2.

Total and the fix order

Area Score Max
Endpoints 21 30
Validation 15 25
Error handling 14 25
Tests 8 20
Total 58 100

A 58 sits in the “solid beginner” band. The cheapest points are: fix the status codes (about 3 points), rename tests (2), add a malformed-request handler (3), and write negative-path tests (4). That is roughly 12 points for a few hours of work, which would move the project to 70 and into mentor-ready range.

A minimal global handler to aim for

Illustrative sketch, not run or compiled here. It shows the shape that earns the error-handling marks.

@RestControllerAdvice
public class ApiExceptionHandler {

    @ExceptionHandler(BookNotFoundException.class)
    public ResponseEntity<ApiError> notFound(BookNotFoundException ex,
                                             HttpServletRequest req) {
        return ResponseEntity.status(404)
            .body(new ApiError(404, "Not Found", ex.getMessage(), req.getRequestURI()));
    }

    @ExceptionHandler(MethodArgumentNotValidException.class)
    public ResponseEntity<ApiError> invalid(MethodArgumentNotValidException ex,
                                            HttpServletRequest req) {
        String msg = ex.getBindingResult().getFieldErrors().stream()
            .map(f -> f.getField() + ": " + f.getDefaultMessage())
            .collect(Collectors.joining("; "));
        return ResponseEntity.status(400)
            .body(new ApiError(400, "Bad Request", msg, req.getRequestURI()));
    }
}

Ten-minute self-audit before you book a mentor

Run these checks in order with a REST client. Each one maps to a scorecard row.

  1. Create a book with valid data. Expect 201 and the created resource.
  2. Create a book with an empty title and a negative copy count. Expect 400 and a message naming both fields.
  3. Create the same ISBN twice. Expect a clear conflict response (409 is the usual choice), not a 500.
  4. Request /api/books/9999. Expect 404 with your standard error body.
  5. Send broken JSON. Expect 400.
  6. Request /api/books/abc. Expect 400, not a stack trace.
  7. Delete a book, then delete it again. The second call should be a predictable 404.
  8. Clone the repository fresh and run the full test command.

Where students lose points most often

  • Returning entities directly. It exposes database structure and causes infinite JSON recursion with bidirectional relationships.
  • Catching exceptions inside controllers. A try-catch in every method duplicates logic; a single advice class is cleaner.
  • Forgetting @Valid. The annotations on the DTO do nothing if the controller parameter lacks it.
  • Testing only the happy path. Failure cases are where bugs hide and where reviewers look.
  • Using the full application context for every test. Slice tests and mocked services are faster and point to the failing layer.

VIT-AP University Internship Structure for Spring Boot and REST API Practice

VIT-AP University is a private university near Vijayawada in Andhra Pradesh, part of the VIT group. Its Career Development Centre overview says the centre handles campus recruitment and training, and that a Placement and Training unit works under it on coding and aptitude skills and interview preparation.

The university internships page describes industry internships, a co-operative education programme as a long internship in the final semester, and international internships, with registration open from the first year. It does not list eligibility, approval steps or durations, so students should ask the centre directly at placement@vitap.ac.in.

On the curriculum side, the 2025 B.Tech CSE curriculum sheet shows 160 graded credits, including Object Oriented Programming using JAVA and Web Technologies. It also lists a 2-credit Summer Internship, a 12-credit Industrial Internship or Senior Design Project, a 6-credit Capstone and Engineering Clinics courses. The sheet does not name Spring Boot, so a REST API starter is best seen as extra practice built on the Java course rather than a prescribed syllabus item. Curricula change by batch, so check the version for your admission year.

A scorecard project is a self-study and portfolio exercise. Whether it can support an internship record depends on approval through the university process.

Checks before using the starter scorecard for internship work

  • Confirm with the Career Development Centre how a self-directed Java project can be registered or evidenced.
  • Check the curriculum PDF for your batch to see which internship course code and credits apply.
  • Ask the faculty guide whether Spring Boot work can feed into the Capstone or Senior Design Project.
  • Clarify what documents or reports the internship course expects at the end.
  • Check the Placement and Training schedule so the project does not clash with scheduled sessions.

A 14-day plan to raise your score

Days Focus Scorecard rows targeted
1-2 Set up project, entities, repositories; baseline self-grade Layering
3-4 Build CRUD endpoints with DTOs and correct status codes All endpoint rows
5-6 Add Bean Validation and path checks Validation annotations, @Valid, messages
7-8 Implement business rules in services Business-rule checks
9-10 Global exception handler, custom exceptions, uniform error body All error-handling rows
11-12 Service unit tests, then MockMvc controller tests Test rows
13 Add pagination; re-run the ten-minute audit Pagination, remaining gaps
14 Final scoring, short README, mentor review request Whole scorecard

Preparing the scorecard for your mentor

Bring three things: the filled scorecard with a one-line reason for each deduction, the repository link with a README listing endpoints and example requests, and the output of your test run. Ask two specific questions, such as “Is my error body shape reasonable?” and “Which missing test would you write first?” Specific questions get specific answers.

After the review, rescore. A before-and-after comparison, such as 58 rising to 76, is more convincing in a portfolio than a claim that the project “follows best practices”.

Frequently Asked Questions

Do I need a database to use this scorecard?

No. An in-memory H2 database is enough for a starter project. The scorecard grades API behaviour, not the database engine.

Should I use PUT or PATCH for updates?

Either earns full marks if used consistently. PUT replaces the whole resource, PATCH changes selected fields. Pick one, document it in the README, and make sure missing resources return 404.

Is 85 or above realistic for a first project?

It is possible but unusual. Most first projects land between 40 and 70. A reliable improvement path is adding negative-path tests and a consistent error body.

Which testing libraries does this assume?

The test rows assume JUnit, Mockito and Spring’s MockMvc, which come through the standard Spring Boot test starter. You can use equivalents, as long as you cover the service, controller and failure cases.

Can I add security and still use this scorecard?

Yes, but it does not grade security. Add authentication after you reach a comfortable score here, and keep tests passing as you do.

Does a high score count for credit at VIT-AP?

The scorecard is an independent self-assessment tool, not an official rubric. Whether any project earns credit depends on your programme rules, so ask your faculty in writing.

How should I record my score in a portfolio?

Put the filled scorecard in the repository, for example as SCORECARD.md, with the date and a list of fixes made. Say clearly that it is a self-assessment.

What if my API is not a library system?

The rows work for any CRUD-style API with a business rule. Replace “duplicate ISBN” with an equivalent rule from your domain, such as a duplicate email or an out-of-stock item.

Related Java & Enterprise Software guides

Ready to put this into practice?

Join the free two-week CareerSwami online internship in Java & Enterprise Software. The internship, the offer letter and the completion certificate are free.

Start your free 2-week internship

Web Stories

Scroll to Top