Skip to content

Repository files navigation

Java Logo

Java Master Handbook

A live "proof of work" tracking daily algorithmic practice, core engine fundamentals, and hands-on Java projects.

Questions Count   Projects Count

About This Repo

This is a multi-project Java learning repo. Each main project is a real, production-grade system built step-by-step from isolated practice questions. Finish all questions → build each module → wire them into the final runnable app. Complete one main project, then move to the next.

Current progress:   🔨 Project 1 — JavaCommerce Order Engine  |  Questions 1–20  |  5 modules

# Main Project Questions Status
1 JavaCommerce Order Engine — multi-source order & catalog pipeline ques 1–20 🔨 In Progress
2 (coming after Project 1 completes)

How to use:

  1. Expand a project row below.
  2. Solve every question in the left column.
  3. Build every function in the right column.
  4. Complete all modules → run the final project.
  5. Start the next main project.

🗺️ The Road to JavaCommerce

 ques 1–6          ques 7–10         ques 11–13        ques 14–18        ques 19–20
    │                  │                  │                  │                 │
    ▼                  ▼                  ▼                  ▼                 ▼
[pro-1]            [pro-2]            [pro-3]            [pro-4]         [pro-final]
Java Utils  →  Data Normalizer  →  RBAC Engine  →  Analytics Engine  →  JavaCommerce


🚀 Project 1  —  JavaCommerce Order Engine  ·  pro-final-javacommerce

What you'll achieve: Build a complete enterprise-grade order pipeline from scratch, in plain Java (no framework). Raw order data from 3 different source systems (a legacy POS export, a mobile-app API, a marketplace feed) enters the system, gets normalized to one unified schema, passes through a role-based security layer that masks sensitive fields per user role, flows into an analytics engine generating pivot reports and running totals, and streams out through a lazily-evaluated custom iterator. You finish by compiling and running one class — pro-final-javacommerce/JavaCommerce.java — that executes the entire pipeline end-to-end. A real, demonstrable portfolio piece that leans on core-Java idioms: interfaces, generics, the Collections Framework, and java.util.concurrent.

Build path:   1.1 Java Utils  →  1.2 Data Normalizer  →  1.3 RBAC Engine  →  1.4 Analytics Engine  →  1.Final JavaCommerce


📦 1.1  —  Java Utility Belt  ·  pro-1-java-utils   ┆   ques 1–6   ┆   🔽 click to open

What you will gain: You build the utility functions every real Java codebase eventually reaches for — deep cloning via copy constructors, flattening nested Map structures, grouping records without leaning on Collectors.groupingBy, chaining transforms with java.util.function.Function, and caching results with a TTL. After this module you will understand how libraries like Guava and Apache Commons work internally, and every module you build after this will call into here.


📝 Questions  — solve all 6 first 🔨 Functions to Build  ·  open project guide →
# File What to Learn
1 ques-1-deep-clone Copy-constructor deep copy
2 ques-2-flatten-map Dot-notation Map flattening
3 ques-3-group-by From-scratch multi-key grouping
4 ques-4-pipe-compose Function composition
5 ques-5-memoize HashMap-backed TTL caching
6 ques-6-curry Curry via nested functional interfaces
Function to Build Needs
deepClone(value) ques-1
flattenMap(map, prefix) ques-2
groupBy(list, keyFn) ques-3
pipe(fns...) ques-4
compose(fns...) ques-4
memoize(fn, ttlMillis) ques-5
curry(triFunction) ques-6
📦 1.2  —  Data Normalizer  ·  pro-2-data-normalizer   ┆   ques 7–10   ┆   🔽 click to open

What you will gain: You learn to accept raw, inconsistent order data from 3 different source systems and convert all of it into one clean unified shape. After this module you will understand the Adapter design pattern in Java (interface + multiple implementations), recursive tree structures, and ExecutorService-based bounded concurrency — skills used in every backend data pipeline that talks to more than one upstream system.


📝 Questions  — solve all 4 first 🔨 Functions to Build  ·  open project guide →
# File What to Learn
7 ques-7-source-adapter Adapter interface, multi-source mapping
8 ques-8-permission-tree Recursive role inheritance
9 ques-9-deep-diff Object change detection
10 ques-10-bounded-concurrency ExecutorService task pool
Function to Build Needs
PosAdapter.normalize(raw) ques-7
MobileAdapter.normalize(raw) ques-7
MarketplaceAdapter.normalize(raw) ques-7
normalizeBatch(rawList, adapter) ques-7, ques-10
resolvePermissions(tree, role) ques-8
deepDiff(before, after) ques-9
📦 1.3  —  RBAC Engine  ·  pro-3-rbac-engine   ┆   ques 11–13   ┆   🔽 click to open

What you will gain: You build a security layer that controls exactly what order data each user role is allowed to see. After this module you will understand how an LRU Cache works via LinkedHashMap's access-order mode (used in every OS, database and CDN), how a Trie powers prefix search/autocomplete (used in IDEs and search engines), and how field-level data masking works under regulations like GDPR — a required feature in every regulated platform.


📝 Questions  — solve all 3 first 🔨 Functions to Build  ·  open project guide →
# File What to Learn
11 ques-11-lru-cache LinkedHashMap-based LRU eviction
12 ques-12-trie Prefix tree / autocomplete
13 ques-13-field-masking Role-based field masking
Function to Build Needs
resolvePermissions(role) ques-8 (from 1.2)
LRUCache<K,V> class ques-11
Trie class ques-12
maskEmail(email) ques-13
maskPhone(phone) ques-13
applyRbac(order, role) ques-8, ques-13
📦 1.4  —  Analytics Engine  ·  pro-4-analytics-engine   ┆   ques 14–18   ┆   🔽 click to open

What you will gain: You turn raw order records into real business intelligence — pivot tables, running totals, moving averages, and multi-key sorted reports. You also build a simple EventBus (the Observer pattern, the same idea behind Swing/AWT listeners) and a token-bucket RateLimiter (used in every API gateway). After this module you will be able to power any reporting dashboard with reactive, well-ordered data.


📝 Questions  — solve all 5 first 🔨 Functions to Build  ·  open project guide →
# File What to Learn
14 ques-14-event-bus Observer pattern / pub-sub
15 ques-15-rate-limiter Token bucket algorithm
16 ques-16-pivot-table Nested-Map pivot table
17 ques-17-running-totals Running totals & moving averages
18 ques-18-multi-key-sort Chained Comparator sort
Function to Build Needs
groupBy(list, keyFn) ques-3 (from 1.1)
EventBus class ques-14
RateLimiter class ques-15
pivotTable(records, rowKey, colKey, valKey) ques-16
runningTotal(records, key) ques-17
movingAverage(records, key, windowSize) ques-17
multiKeySort(records, comparators...) ques-18
⭐ 1.Final  —  JavaCommerce Order Engine  ·  pro-final-javacommerce   ┆   ques 19–20 + all above   ┆   🔽 click to open

What you will gain: You wire all 4 modules into one running application. Compile and run JavaCommerce.java and watch raw order data flow through normalization → RBAC masking → analytics, streamed lazily through a custom Iterator, producing a live report in the terminal. After this you will have a complete, demonstrable pipeline architecture — a real portfolio piece that shows you can design and build production-grade Java systems end-to-end using only the standard library.


📝 Questions  — final 2 concepts + all previous 🔨 Pipeline Steps to Build  ·  open project guide →
# File What to Learn
19 ques-19-lazy-iterator Custom lazy-streaming Iterator
20 ques-20-safe-serialize Cycle-safe JSON-ish serialization

Also requires: all ques 1–18 (modules 1.1–1.4 complete)

Pipeline Step Needs
step1Normalize(batch, adapter) 1.2 complete
step2ApplyRbac(orders, role) 1.3 complete
step3GenerateReport(orders) 1.4 complete
step4AuditTrail(before, after) ques-9, ques-20
OrderStream (Iterable<Order>) ques-19
buildPipeline(role) 1.1 pipe() + all above

Run: javac pro-final-javacommerce/*.java && java -cp pro-final-javacommerce JavaCommerce


📋 Quick Reference

🚀 Project 1 — JavaCommerce Order Engine  ·  pro-final-javacommerce

About

Progressive Java learning repo — daily practice questions, OOP-driven sub-modules, and a capstone project (JavaCommerce Order Engine) built step-by-step from scratch.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages