Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🚀 CreaTIP Backend API

This is the backend service for the CreaTIP platform, built using Node.js and Express. It provides robust APIs for User authentication, AI generation features, Creator management, and Administration dashboards.

The API documentation is auto-generated and presented using Swagger UI with a custom Dark Mode theme for a better developer experience.

🛠️ Tech Stack

  • Runtime: Node.js
  • Framework: Express.js
  • Documentation: Swagger UI Express & Swagger JSDoc
  • Styling: Swagger Themes (Dark Mode)
  • Security: CORS, Cookie Parser
  • Authentication: JWT (JSON Web Token)

📂 Project Structure

├── controller/       # Business logic (User, Creator, AI, Admin)
├── middleware/       # Authentication & Error handling
├── routes/           # API Route definitions
├── index.js          # App entry point
├── .env              # Environment variables
└── README.md         # Project documentation

⚙️ Getting Started

Follow these steps to set up and run the project locally.

1. Clone the Repository

git clone https://github.com/lrmn7/CreaTIP.git
cd CreaTIP

2. Install Dependencies

Ensure you have Node.js installed, then run:

npm install

3. Environment Configuration

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

DATABASE_URL="YOUR DATABASE URL"
PORT=3001
ALLOWED_CORS="front-end domain"
HTTPONLY="can be true or false"
SAMESITE=Lax
DOMAIN="your domain"
TOKEN_SECRET="your_super_secret_key (type node then enter require('crypto').randomBytes(64).toString('hex')"

4. Run the Server

To start the server in development mode (using nodemon):

npm run dev

Or standard mode:

node index.js

If successful, you will see the following output:

==========================================
✅ Running Server: http://localhost:3001
📂 Docs: http://localhost:3001/api-docs-creatip
==========================================

📖 API Documentation (Swagger)

We use Swagger to document all available endpoints. You can access the interactive documentation here:

👉 http://api-creatip.vercel.app/api-docs-creatip

Features:

  • Interactive Testing: Test endpoints directly from the browser.
  • Dark Mode: Integrated with swagger-themes for a sleek visual interface.

🛣️ Key Endpoints

Method Base Route Description
User /v1/user Register, Login, Profile Management
AI /v1/ai AI-powered generation features
Creator /v1/creators Creator specific data & actions
Admin /v1/admin Administrative dashboard access

🤝 Contributing

Contributions are welcome!

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

About

A simple platform built on the Somnia Network to help creators receive support from their community.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages