Skip to content

sagarmusabbir/tb-backend

Repository files navigation

Thirdbracket Admin Dashboard

Step into Third Bracket Solutions, a UK-based modern web infrastructure development service born from the collective efforts of a group of nomads who conquered platforms like Upwork and Fiverr


You can copy/paste code you want from this project, or use the whole thing for your website.

Table of Contents

How to use in your own project

In this case, we assume you already have a Next.js project.

You can copy any of the code from the .tsx files in app to your own Next.js project. Some pages contain optional dependencies discussed further below. Pages might also use some of the static files found in public.

Your Next.js project will also need to have flowbite-react installed. That's it! If you're unfamiliar, see the open-source guide on how to install flowbite-react.

Optional dependencies include:

Finally, you can use your own back-end APIs by replacing the contents of the relevant page.tsx files. For example, if you would like to load JSON data from a remote server for the Dashboard, open app/(dashboard)/(footer)/page.tsx and replace the following:

async function getData() {
  return { dashboard } as DashboardPageData;
}

By something like this:

async function getData() {
  const remoteJSON = await fetch("https://remote-server-with-dashboard-data.com");
  return remoteJSON.json() as DashboardPageData;
}

You might also consider using a library like zod to verify the JSON you receive from this remote API fits the schema outlined inside the types folder here.

As long as your remote server provides JSON that looks identical to our schema, you're good to go! Alternatively, you can always adjust the schema in types and update the relevant parameters referred to inside the front-end at app/(dashboard)/(footer)/content.tsx.

How to install

Assumptions

  • You can open a shell/terminal/command prompt
  • You have Git instaslled and can run git in the shell
  • You have Node.js installed and can run node, npm in the shell

Clone this repository

git clone https://github.com/themesberg/flowbite-react-admin-dashboard.git
cd flowbite-pro-nextjs-admin-dashboard

Install dependencies for this project

npm i

How to develop locally

This command will output a link to the local server.

npm run dev

How to build for production

This command will build your server and client packages. For more information about what those look like, refer to Vercel's docs on deploying Next.js. Note: your code won't build if you have TypeScript errors or ESLint warnings.

npm run build

How to deploy

Next.js projects are designed to be deployed most easily to Vercel, but they can be deployed to other platforms, including your own Node.js server. Refer to Vercel's docs on deploying Next.js for more information.

Releases

No releases published

Packages

No packages published

Languages