Welcome to Text Snap! This repository houses multiple services and applications that collectively form the core of our platform. Below is an overview of each application, along with instructions on how to get started.
- Prerequisites 🛠️
- Installation 🚀
- Environment Variables 🔑
- General Setup ⚙️
- Project Structure 📂
- Utilities 🔧
- License 📜
Before using this project, ensure you have the following installed:
To set up the project, clone the repository and install the dependencies:
git clone https://github.com/serudda/text-snap.git
cd text-snap
To run the project, you'll need to configure environment variables.
You need to add everything to .env.local
, but only configure OPENAI_API_KEY
.
Here's a sample configuration:
DATABASE_URL=http://localhost:3000
NEXTAUTH_SECRET=supersecret
NEXTAUTH_URL=http://localhost:3000
LEMON_SQUEEZY_URL=http://localhost:3000
LEMON_SQUEEZY_API_KEY=http://localhost:3000
TWITTER_CONSUMER_KEY=http://localhost:3000
TWITTER_CONSUMER_SECRET=http://localhost:3000
OPENAI_API_KEY=<YOUR-OPEN-AI-KEY>
NEXT_PUBLIC_POSTHOG_KEY=http://localhost:3000
NEXT_PUBLIC_POSTHOG_HOST=http://localhost:3000
From the root of the project, you can run the following commands:
- Install dependencies:
pnpm install
- Run DB Generate:
pnpm db:generate
- Run build:
pnpm build
- Run Development:
pnpm dev
- Web Page: http://localhost:3000
- Prisma Page: http://localhost:5556
apps/nextjs
:Main App built with Nextjs.apps/payments
: Manages payment processing
-
packages/ai
: Contains OpenAI-related functionality. This package includes utilities for handling AI operations such as text formatting, language detection, grammar correction, and content improvement. -
packages/api
: The API package, managing TRPC configuration and controllers for the backend. -
packages/auth
: Manages authentication using NextAuth. -
packages/config
: Contains configuration files and shared settings for the project. -
packages/db
: Prisma-based database management package.
- ESLint: Linting tool to maintain code quality.
- Prettier: Code formatter for consistent code style.
This project is licensed under the MIT License - see the LICENSE file for details.