Tutorial: Tasks App
📄️ 1. Overview
Tasks is a simple Root App with a React UI and backend service for managing a list of shared tasks. Members can add new tasks and delete completed tasks. Changes are immediately visible to all members.
📄️ 2. Setup
You can develop for the Root Platform on Windows or macOS. You'll need to do a few Root setup tasks before starting to write code. Skip any steps that you've completed previously.
📄️ 3. Generate starter code
Root supplies a command-line utility named create-root that generates starter code. Here, you'll create your code, build it, and test that it works with your community.
📄️ 4. In-memory storage
In this section, you'll build the Tasks App with in-memory storage in your server. There won't be any persistence yet; all data will be lost every time you restart your server. The goal is to make sure the core of the App is working before adding the complexity of a database.
📄️ 5. SQLite with Knex
In this section, you'll store the tasks in SQLite. Recall that SQLite is built-in to Root and is always available on your server side. Root will even back up and restore your data file automatically as long as you use the filename provided in the Root API.
📄️ 6. SQLite with Prisma
In this section, you'll use Prisma to store tasks in SQLite. Prisma is a TypeScript ORM for Node.js that simplifies database access by providing a type-safe and auto-generated query builder. It works with relational databases like PostgreSQL, MySQL, and SQLite. Prisma uses a schema file to define your data models, and it generates a client you can use to perform queries with full IntelliSense support. It also includes tools for migrations, seeding, and database introspection, making it good for developers who want strong typing, productivity, and maintainability.