nextcorp

Nextcorp Documentation

Next.js ElysiaJS PostgreSQL

Table of Contents

Overview

Nextcorp is a comprehensive toolkit designed to cater to the diverse needs of businesses and enterprises. Developed using Next.js, Nextcorp boasts a modern and versatile framework that seamlessly integrates essential pages, ensuring a cohesive user experience.

From showcasing your products and services to engaging with your audience through a dynamic blog page, Nextcorp provides the perfect platform to elevate your online presence. With its sleek design and intuitive navigation, visitors will be effortlessly guided through your site, enhancing their overall experience.

Routes

  1. /: Home page showcasing company information and featured products/services.
  2. /blog: Displays a list of blog posts.
  3. /login: Login page for users to authenticate.
  4. /register: Registration page for new users.
  5. /blog/slug-of-blog: Displays a specific blog post identified by its slug.
  6. /refresh: Endpoint to refresh JWT token.
  7. /revoke: Endpoint to revoke the refresh token.

Features

Diagrams

Use Case Diagram

Use Case Diagram

High-Level Architecture

High-Level Architecture

Database ER Diagram

Database ER Diagram

Screenshots

Home Page (Light/Dark Theme)

Light Theme Dark Theme
Light Theme Dark Theme

Blog Page

Blog Page

Single Blog Page

Single Blog Page

Contact Page

Contact Page

Login Page

Login Page

Register Page

Register Page

Admin Dashboard

Admin Dashboard

System Testing and Code Coverage Report

While Elysia.js is a relatively new framework, it boasts a robust Unit Testing capability when paired with the Bun runtime. Leveraging the Bun runtime, which incorporates a built-in test runner accessible through the bun:test module, developers can easily conduct unit tests akin to Jest.

Unit Testing

To ensure the reliability and stability of Nextcorp, I meticulously crafted a comprehensive suite of unit tests. These tests cover a spectrum of scenarios that Nextcorp’s API might encounter, including various HTTP status codes such as 200, 401, 404, 409, and 500. Below, you’ll find details regarding the test endpoint, descriptions, and associated status codes.

Unit Testing

Code Coverage Report

Bun’s test runner supports built-in code coverage reporting. This makes it easy to see how much of the codebase is covered by tests and find areas not currently well-tested. I write the bunfig.toml file to enable this feature. This will print out the coverage reporting for me as below.

Code Coverage Report

Creator

Created by Minh Tran