Skip to content

Commit

Permalink
Merge pull request #1 from developersdigest/patchwork-generatereadme-…
Browse files Browse the repository at this point in the history
…main

Patchwork PR: GenerateReadme
  • Loading branch information
developersdigest authored Sep 17, 2024
2 parents c523445 + 445dfa1 commit 7a7622c
Showing 1 changed file with 66 additions and 24 deletions.
90 changes: 66 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,79 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/create-next-app).

## Getting Started
# Code Documentation

First, run the development server:
## Overview

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
This project is a Next.js application that implements a Consultant Report Generator. It allows users to generate reports based on URLs and custom instructions, as well as edit and format the generated content.

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
## Key Components

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
### 1. ConsultantReportGeneratorComponent (components/consultant-report-generator.tsx)

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load Inter, a custom Google Font.
This is the main component of the application. It includes:

## Learn More
- A form for URL and instruction input
- A rich text editor for report content
- Formatting controls for the editor
- A function to generate random sample reports

To learn more about Next.js, take a look at the following resources:
#### Inputs:
- URL (string)
- Instructions (string)

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
#### Outputs:
- Generated report content (HTML)

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
### 2. API Route (app/api/generate-report/route.ts)

## Deploy on Vercel
This serverless function handles the report generation process:

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
- Crawls the provided URL using Firecrawl
- Generates a report using OpenAI's GPT model

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
# ai-consulting
#### Inputs:
- URL (string)
- Instructions (string)

#### Outputs:
- Generated HTML content
- Crawl data

### 3. UI Components (components/ui/*)

Custom UI components used throughout the application:
- Button
- Input
- Textarea

### 4. Layout and Styling

- Global styles defined in app/globals.css
- Tailwind CSS used for styling
- Custom font configuration in app/layout.tsx

## Key Features

1. URL-based report generation
2. Rich text editing capabilities
3. Random sample report generation
4. Responsive design

## Technologies Used

- Next.js (React framework)
- TypeScript
- Tailwind CSS
- TipTap (rich text editor)
- OpenAI API
- Firecrawl (web crawling)

## Setup and Usage

1. Install dependencies: `npm install`
2. Set up environment variables (OpenAI API key, Firecrawl API key)
3. Run the development server: `npm run dev`
4. Access the application at `http://localhost:3000`

## Deployment

The project is configured for easy deployment on Vercel, the creators of Next.js.

0 comments on commit 7a7622c

Please sign in to comment.