Skip to content

piyushchauhan2011/sbt-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SBT Tutorial Monorepo

Learning Scala and SBT by following "Get Programming with Scala" by Manning.

This is a monorepo containing chapter-wise SBT projects. Each lesson/chapter has its own independent SBT project.

Monorepo Structure

sbt-tutorial/
β”œβ”€β”€ lesson-09/          # Lesson 9: Import and create packages
β”‚   β”œβ”€β”€ build.sbt
β”‚   β”œβ”€β”€ README.md
β”‚   └── src/
β”‚       └── main/
β”‚           └── scala/
β”œβ”€β”€ lesson-54/          # Lesson 54: Apache Pekko HTTP Server - Todo App
β”‚   β”œβ”€β”€ build.sbt
β”‚   β”œβ”€β”€ README.md
β”‚   └── src/
β”‚       └── main/
β”‚           └── scala/
β”œβ”€β”€ lesson-XX/          # Future lessons will be added here
└── ...

Why a Monorepo?

  • Isolation: Each lesson is independent and can be run separately
  • Organization: Easy to navigate and find specific lesson examples
  • Learning: Clear progression through the book
  • Version Control: Single git repository for all lessons

Working with a Lesson

Each lesson is a complete SBT project. To work with a specific lesson:

# Navigate to the lesson directory
cd lesson-09

# Start SBT console
sbt

# Compile the project
sbt compile

# Run tests
sbt test

# Run a specific main class
sbt run

Current Lessons

  • Lesson 9: Import and create packages

    • Demonstrates package creation (my.example.io)
    • Example: MyExample.scala - File reading utility class
  • Lesson 54: Apache Pekko HTTP Server - Todo App

    • In-memory todo application with server-rendered HTML
    • Demonstrates Pekko HTTP routing, form handling, and HTML generation
    • Features: Add, view, toggle, delete todos with a clean web interface

Adding New Lessons

When you reach a new lesson in the book:

  1. Create a new directory: lesson-XX/
  2. Add a build.sbt file with appropriate dependencies
  3. Create src/main/scala/ directory structure
  4. Add a README.md explaining what the lesson covers
  5. Implement the examples from the book

Git Configuration

This repository is configured with:

All commits will use these credentials automatically.

Learning Progress

Following the book chapters and implementing examples as I go! πŸš€

About

Scala and SBT Tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages