Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Todo app performing CRUD operations with AstraDB(Cassandra DB) APIS. Used Next JS APIS.
This is a full-stack boilerplate project that combines a Next.js 13 front end with a serverless DataStax Astra DB (Apache Cassandra) backend, demonstrating every CRUD operation through Next.js API routes.
The Astra DB Todo App Crud is an open-source sample application, written in TypeScript, that shows how to build a todo list connected to a managed Cassandra database. It accepts todo items through a Material UI and Tailwind CSS interface, stores them in a todos table inside an Astra DB keyspace, and exposes GET, POST, PUT, and DELETE endpoints via Next.js API routes. The project was created by Muhammad Bilal and is available on GitHub with a live demo at astratodo.vercel.app.
todos table created with the CQL console and sample data inserted using CQL commands..env.local file using REACT_APP_ASTRA_DB_ prefixed variables.Clone the repository, run npm install, create a .env.local file with your Astra DB credentials, and start the development server with npm run dev. The Next.js API routes then handle CRUD requests to the todos table, while the front-end components render the list and send mutations.
You need Node.js, a package manager like npm, yarn, or pnpm, and an active Astra DB database. You also need your database ID, region, keyspace, and a token, which you paste into a .env.local file following the README's setup section.
The source code is publicly available on GitHub and can be cloned, modified, and deployed without restrictions. The underlying Astra DB service is hosted by DataStax, and the project code itself contains no paid components.
Both. Apache Cassandra is the open-source NoSQL database technology, and Astra DB is DataStax's serverless managed version. The todo data is stored in a Cassandra table accessed through the Astra DB platform.
The README instructs you to open the CQL console in your Astra DB database, then run CQL commands to create the todos table and insert sample rows before running the Next.js app.
The .env.local file requires REACT_APP_ASTRA_DB_ID, REACT_APP_ASTRA_DB_REGION, REACT_APP_ASTRA_DB_KEYSPACE, and REACT_APP_ASTRA_DB_TOKEN. The README shows example values for a demo database; you must replace them with your own to connect safely.
