Skip to content

This project is a RESTful To-Do List API built using Scala and Akka HTTP. It allows users to create, update, delete, and retrieve tasks, making it useful for task management applications

Notifications You must be signed in to change notification settings

masterhj/Scala-TDL-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Scala To-Do API ๐Ÿš€

A production-ready To-Do list API built with:

  • Scala (2.13)
  • Akka HTTP (REST endpoints)
  • Slick (Database access)
  • PostgreSQL (Data persistence)

API Demo Scala Version License

Features โœจ

  • CRUD Operations:
    • Create, Read, Update, Delete todos
    • Mark todos as complete
  • RESTful API with proper HTTP status codes
  • Database Integration with PostgreSQL
  • JSON Serialization using Spray JSON
  • Proper Error Handling
  • Configuration Management with Typesafe Config

Prerequisites ๐Ÿ“‹

  • Java 8+
  • Scala 2.13.8
  • sbt 1.6.2+
  • PostgreSQL 12+
  • (Optional) Docker for containerization

Setup & Installation ๐Ÿ› ๏ธ

1. Database Setup

-- Create database
CREATE DATABASE tododb;

-- Connect to database
\c tododb

-- Create todos table
CREATE TABLE todos (
  id SERIAL PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  description TEXT,
  is_completed BOOLEAN DEFAULT FALSE,
  created_at TIMESTAMP NOT NULL DEFAULT NOW(),
  updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);

-- Create index for better performance
CREATE INDEX idx_todos_completed ON todos(is_completed);

About

This project is a RESTful To-Do List API built using Scala and Akka HTTP. It allows users to create, update, delete, and retrieve tasks, making it useful for task management applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages