https://github.com/jlokitha/designhub-backend
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.
https://github.com/jlokitha/designhub-backend
backend expressjs jwt mysql nodejs prisma rest-api typescript
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/jlokitha/designhub-backend
- Owner: jlokitha
- License: mit
- Created: 2025-02-05T10:49:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-26T10:45:37.000Z (about 1 year ago)
- Last Synced: 2026-01-03T16:26:16.846Z (6 months ago)
- Topics: backend, expressjs, jwt, mysql, nodejs, prisma, rest-api, typescript
- Language: TypeScript
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](#overview)
- [Tech Stack](#tech-stack)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Environment Variables](#environment-variables)
- [Development](#development)
- [API Documentation](#api-documentation)
- [Frontend Repository](#frontend-repository)
- [License](#license)
---
## 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:
- [Node.js](https://nodejs.org/en/download)
- [MySQL](https://www.mysql.com/downloads/)
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/jlokitha/DesignHub-Backend.git
cd DesignHub-Backend
```
2. **Install dependencies:**
```bash
npm install
```
3. **Generate Prisma Client:**
```bash
npx prisma generate
```
---
### Environment Variables
Create a `.env` file in the project root and configure the following variables:
```env
# 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:
```bash
npm start
```
---
## API Documentation
Detailed API endpoint documentation is available via our Postman collection.
Access it [here](https://documenter.getpostman.com/view/35384124/2sAYdfqWRK).
---
## Frontend Repository
Access the frontend repository on GitHub [here](https://github.com/jlokitha/DesignHub-Frontend.git).
---
## License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
---
© 2025 Janindu Lokitha