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.
- 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)
├── 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
Follow these steps to set up and run the project locally.
git clone https://github.com/lrmn7/CreaTIP.git
cd CreaTIP
Ensure you have Node.js installed, then run:
npm install
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')"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
==========================================
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-themesfor a sleek visual interface.
| 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 |
Contributions are welcome!
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.