Skip to content

DesignHub Backend is a RESTful API server built with Node.js, Express, and TypeScript, powering the DesignHub platform—a UI component gallery for sharing React components.

License

Notifications You must be signed in to change notification settings

jlokitha/DesignHub-Backend

Repository files navigation

DesignHub Logo

DesignHub Backend

DesignHub is a platform where users share and tweak React component code snippets—from buttons to modals—making UI design knowledge accessible to everyone. This repository contains the backend server powering DesignHub, built with Node.js, Express, and TypeScript, with Prisma managing a MySQL database.


Table of Contents

Overview

The DesignHub backend is responsible for handling all server-side operations, including:

  • User management and authentication.
  • CRUD operations for UI component snippets.
  • Serving data via a RESTful API.

By leveraging Express and TypeScript, the backend provides a robust and type-safe environment, while Prisma simplifies database interactions with MySQL.


Tech Stack

  • Node.js – JavaScript runtime.
  • Express.js – Web framework for building APIs.
  • TypeScript – Superset of JavaScript for type safety.
  • Prisma – ORM for MySQL database management.
  • MySQL – Relational database.

Getting Started

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/jlokitha/DesignHub-Backend.git
    cd DesignHub-Backend
  2. Install dependencies:

    npm install
  3. Generate Prisma Client:

    npx prisma generate

Environment Variables

Create a .env file in the project root and configure the following variables:

# MySQL connection string
DATABASE_URL="mysql://USER:PASSWORD@HOST:PORT/DATABASE_NAME"
BASE_URL="http://localhost:3000"

# Secret keys
SECRET_KEY=[Secret key for JWT]
REFRESH_TOKEN=[Refresh token secret key]

Development

To start the development server with live reload, run:

   npm start

API Documentation

Detailed API endpoint documentation is available via our Postman collection.
Access it here.


Frontend Repository

Access the frontend repository on GitHub here.


License

This project is licensed under the MIT License. See the LICENSE file for details.


© 2025 Janindu Lokitha

About

DesignHub Backend is a RESTful API server built with Node.js, Express, and TypeScript, powering the DesignHub platform—a UI component gallery for sharing React components.

Topics

Resources

License

Stars

Watchers

Forks