https://github.com/parbhat-cpp/gencap-server
AI social media captions generator
https://github.com/parbhat-cpp/gencap-server
ai aws-s3 cloudflare expressjs llama nodejs typescript vision
Last synced: 2 months ago
JSON representation
AI social media captions generator
- Host: GitHub
- URL: https://github.com/parbhat-cpp/gencap-server
- Owner: parbhat-cpp
- Created: 2024-12-07T07:56:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-28T03:52:30.000Z (over 1 year ago)
- Last Synced: 2025-05-19T05:06:55.667Z (about 1 year ago)
- Topics: ai, aws-s3, cloudflare, expressjs, llama, nodejs, typescript, vision
- Language: TypeScript
- Homepage: https://parbhat-cpp.github.io/gencap/
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# GenCap Server
## Installation
Fork and clone my project. After that run the installation command.
```bash
npm install
```
To run on dev environment
```bash
npm run dev
```
To create a build
```bash
npm run build
```
## Environment Variables
To run this project, you will need to add the following environment variables to your .env file
`GROQ_API_KEY` = Using Groq to access Llama vision AI
`TOKEN_VALUE` = Provided by Cloudflare
`AWS_ACCESS_KEY_ID` = Provided by Cloudflare
`AWS_SECRET_ACCESS_KEY` = Provided by Cloudflare
`R2_BUCKET_NAME` = Cloudflare R2 bucket name
`R2_ENDPOINT` = Provided by Cloudflare
`R2_ACCESS_URL` = Provided by Cloudflare to access image
## API Reference
### Images API
#### Uploads image to Cloudflare R2 bucket
```http
POST /api/image/upload
```
#### Delete image from Cloudflare R2 bucket
```http
POST /api/image/delete
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `object-key` | `string` | **Required**. object-key to delete image |
### AI API
#### Generate captions
```http
POST /api/ai/generate-captions
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `image-name` | `string` | **Required**. To access image from Cloudflare bucket |
| `caption-length` | `string` | **Optional**. To set length of the captions. Values allowed ["short length", "medium length", "long length"] |
| `user-prompt` | `string` | **Optional**. To add additional information with image |
## Tech Stack
**Client:** React, TailwindCSS, Shadcn ([Client repo](https://github.com/parbhat-cpp/gencap))
**Server:** Node, Express, Cloudflare R2, Llama vision AI API
## Authors
- [@parbhat-cpp](https://www.github.com/parbhat-cpp)