Skip to content

A comprehensive toolkit designed to cater to the diverse needs of businesses and enterprises built with Next.js, Bun runtime, Elysia.js, and PostgreSQL.

License

Notifications You must be signed in to change notification settings

minhtran241/nextcorp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Company Showcase: Nextcorp highlights company information and featured products/services on the home page.
  • Blog: Users can read and share blog posts on various topics related to the company's domain.
  • User Authentication and Authorization: Provides login and registration functionality for users to access member-only features. 2 types of users: Admin and Regular.
  • Social Media Sharing: Users can easily share blog posts via social media platforms.
  • Admin Dashboard: Admins can create, edit, and delete blog posts through a secure dashboard.
  • Dark/Light/System Theme: Users can switch between dark, light, and system themes for a personalized experience.
  • Message Submissions: Users can submit messages to the company for inquiries or feedback.
  • Schedule Meeting: Users can schedule a meeting with the company through a simple form.

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

About

A comprehensive toolkit designed to cater to the diverse needs of businesses and enterprises built with Next.js, Bun runtime, Elysia.js, and PostgreSQL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published