Exercise: Databases
by Tomas Trescak· Databases

0 / 1930 XP
The external project has not been reviewed yet
Please follow instructions below to submit your project

Installation

We will continue using the same project as in your tutorials and previous lectures in this section and the following sections. Please download it from your forked repository (instructions here )

Instructions

  1. Complete all the user requirements below
  2. Cover each user requirement by end-to-end test (tag each test by @databases)
  3. If necessary, cover utility code and component code with unit or integration tests
  4. Commit and push the code
  5. Make sure all tests pass
  6. Commit and push your code to your repository

Setup

In this section, we will play with native drivers to access SQLite, Postgres and MongoDB, please install them in your project:

pnpm i pg mongodb sqlite3

You will also need access to a Mongodb and Postgres database. We recommend you create an account with Mongodb and Vercel or Neon:

Mongo Database

Mongo Atlas: https://www.mongodb.com/resources/basics/databases/cloud-databases/free-cloud-database

Postgres

Vercel: https://nextjs.org/learn/dashboard-app/setting-up-your-database
Neon: https://www.neon.tech

SQLite

Nothing needed here

System Requirements

All branches:

  1. Cache database requests with 1 hour update interval
  2. Preload blog post when hovering over the link
  3. Use combination of server actions and client side mutations
  4. All requests must be validated for data types and structure
  5. I want to obtain a filtered list of posts from the database based on tags
  6. I want to show the list of available tags
  7. I want to be able to like the post
  8. I want to update post

Git Branch - “Sqlite”

  1. I want to obtain the list of posts from the SQL database

Git Branch - “Postgres”

  1. I want to obtain the list of posts from the Postgres database

Git Branch - “Mongodb”

  1. I want to obtain the list of posts from the Mongodb database

Discuss with Others
Ask questions, share your thoughts, and discuss with other learners

Join the discussion to ask questions, share your thoughts, and discuss with other learners
Setup
React Fundamentals
10 points
Next.js
10 points
Advanced React
Databases
10 points
React Hooks
Authentication and Authorisation
10 points
APIs
CI/CD and DevOps
Testing React
Advanced Topics