Intermediate Projects
Prerequisites: Level 2 — Intermediate
Build these using classes, traits, AST transformations, closures, files, JSON, XML, and builders from Level 2.
1. Library Management System
Model Book, Member, and Loan with @Canonical or records, and a
Library class that lends and returns books, rejects invalid operations
with custom exceptions, and saves its state to a JSON file and loads it back.
2. Log Analyzer
Read a log file line by line, parse each line with a regex into a map (time,
level, message), and print counts per level, the busiest hour, and the most
frequent error messages using groupBy and countBy.
3. Static Site Generator
Read a folder of text files with a small header (title:, date:), render
each one to HTML with MarkupBuilder, and generate an index page that links
to every post, sorted by date.
4. Config Converter
Write a command-line script that converts between JSON, XML, and YAML configuration files, with a statically compiled core and a Spock-free test script that uses power assertions.