Share your awesome prompts with users - A comprehensive platform for creating, managing, and sharing AI/LLM prompts with advanced features like variables, notices, and community collaboration.
- π Project Overview
- π§ Tech Stack
- π¨ Architecture
- π Getting Started
- π Usage Guide
- π οΈ Development
Use Textify is a modern web platform designed to help users create, share, and discover high-quality AI/LLM prompts. The platform enables prompt creators to build sophisticated prompt templates with dynamic variables, helpful notices, and community-driven categorization.
-
π Advanced Prompt Creation
- Rich text prompt editor with markdown support
- Dynamic variable system for reusable prompts
- Contextual notices and warnings for prompt usage
- Category-based organization with visual icons
-
π Discovery & Search
- Advanced search functionality with filters
- Category-based browsing with intuitive icons
- Tag-based filtering and discovery
- Infinite scroll pagination for seamless browsing
-
π₯ Community Features
- User authentication via Google OAuth2
- Public prompt sharing and collaboration
- Community-driven tagging system
- User profiles and contribution tracking
-
π€ AI-Powered Generation
- Automated prompt generation using OpenAI GPT
- Concept-based prompt creation
- Quality-controlled content generation
- Scheduled background processing for content creation
-
π± Modern User Experience
- Progressive Web App (PWA) capabilities
- Mobile-responsive design with Tailwind CSS
- DaisyUI components for consistent styling
- Service worker for offline functionality
This is a monorepo managed with pnpm workspaces, containing three main packages:
web/- Next.js frontend applicationcron/- Node.js background service for AI generationdb/- PocketBase database with custom hooks and migrations
- Framework: Next.js (App Router)
- Language: TypeScript
- Styling:
- Tailwind CSS 3.4.1
- DaisyUI 5.0.38 for component library
- Custom design system with consistent theming
- State Management:
- TanStack Query for server state
- React Hook Form for form management
- Zod for schema validation
- UI Components:
- Lucide React for icons
- Custom component library following FSD architecture
- Development Tools:
- ESLint with Next.js configuration
- TypeScript strict mode
- TanStack Query ESLint plugin
-
Cron Service:
- Node.js with Express
- OpenAI API integration
- TypeScript with ts-node for development
- Environment-based configuration with dotenv
-
Database Backend:
- PocketBase as primary database and API
- Custom JavaScript hooks for business logic
- Real-time subscriptions and authentication
- File upload and management capabilities
- Primary Database: PocketBase (SQLite-based)
- Key Collections:
feeds- Main prompt/feed storagecategories- Prompt categorizationtags- Flexible tagging systemfeed_variables- Dynamic prompt variablesfeed_notices- Usage warnings and tipscomments- Community interactionusernames- User profile management
Use Textify follows the Feature Sliced Design architectural methodology, providing a scalable and maintainable code organization. FSD enforces strict dependency rules and promotes modular development.
The application is organized into five distinct layers with clear dependency rules:
-
app/- Application Layer (Highest)- Next.js App Router pages and layouts
- Route handlers and server actions
- Global providers and configuration
- Can import from:
widgets,features,entities,shared
-
widgets/- UI Composition Layer- Complex UI blocks combining multiple features
- Page-level components and layouts
- Navigation and structural elements
- Can import from:
features,entities,shared
-
features/- Business Logic Layer- User interactions and workflows
- API integrations and data mutations
- Business rules and validation logic
- Can import from:
entities,shared
-
entities/- Domain Models Layer- Domain types and interfaces
- Core business models
- Entity-specific UI components
- Can import from:
sharedonly
-
shared/- Infrastructure Layer (Lowest)- Reusable utilities and helpers
- UI component library
- Configuration and constants
- Cannot import from any other layer
use-textify/
βββ web/ # Next.js Frontend Application
β βββ app/ # App Router (FSD: Application Layer)
β β βββ (entry)/ # Route groups for organization
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout with providers
β β βββ providers/ # Global React providers
β βββ entities/ # FSD: Domain Models Layer
β β βββ auth/ # Authentication domain
β β βββ category/ # Category management
β β βββ comment/ # Comment system
β β βββ feed/ # Core prompt/feed domain
β β βββ tag/ # Tagging system
β β βββ username/ # User profile management
β βββ features/ # FSD: Business Logic Layer
β β βββ auth/ # Authentication workflows
β β βββ category/ # Category management features
β β βββ comment/ # Comment functionality
β β βββ feed/ # Feed/prompt management
β β βββ tag/ # Tag management
β β βββ utils/ # Feature-specific utilities
β βββ shared/ # FSD: Infrastructure Layer
β β βββ lib/ # Shared libraries and utilities
β β βββ ui/ # Reusable UI components
β βββ widgets/ # FSD: UI Composition Layer
β βββ auth/ # Authentication UI blocks
β βββ category/ # Category display widgets
β βββ comment/ # Comment UI components
β βββ feeds/ # Feed/prompt display widgets
βββ cron/ # Background Processing Service
β βββ src/
β β βββ app.ts # Express server entry point
β β βββ lib/
β β βββ client/ # API clients (OpenAI)
β β βββ prompt/ # Prompt generation logic
β β βββ schema/ # Data validation schemas
β β βββ service/ # Business services
β βββ package.json # Service dependencies
βββ db/ # PocketBase Database
β βββ pb_hooks/ # Custom PocketBase hooks
β β βββ feed.pb.js # Feed management logic
β β βββ generate.pb.js # AI generation workflows
β βββ pb_migrations/ # Database schema migrations
βββ package.json # Root package configuration
βββ pnpm-workspace.yaml # Monorepo workspace config
βββ pnpm-lock.yaml # Dependency lock file
- Node.js
- pnpm
- OpenAI API
- Git for version control
- Google OAuth2 credentials for authentication
Before installation, we should configure environment variables.
-
Clone the repository
git clone <repository-url> cd use-textify
-
Install dependencies
pnpm install
-
Set up environment variables
# Create environment files for each service cp web/.env.example web/.env.local cp cron/.env.example cron/.env
-
Start the database
pnpm db:dev
-
Start the web application
pnpm web:dev
-
Start the cron service (optional, for AI generation)
pnpm cron:dev
-
Access the application
- Web App: http://localhost:3000
- Database Admin: http://127.0.0.1:3001/_/
-
π Authentication
- Sign in with Google OAuth2
- Automatic profile creation and management
- Secure session management with PocketBase
-
π Prompt Creation
- Create detailed prompts with title, description, and main content
- Add dynamic variables for prompt customization
- Include helpful notices and usage warnings
- Categorize prompts for better organization
- Tag prompts for improved discoverability
-
π Discovery
- Browse prompts by category using visual icons
- Search prompts by keywords, tags, or categories
- Filter results with advanced search options
- Infinite scroll for seamless browsing experience
-
π₯ Community Interaction
- View and comment on community prompts
- Share your own prompts publicly
- Follow tags and categories of interest
- Automated Prompt Generation
- Uses OpenAI GPT models for content creation
- Generates prompts based on provided concepts
- Includes proper variable definitions and usage notices
- Maintains quality standards through structured prompts
The project follows FSD principles with clear separation of concerns:
- Entities: Core domain models and types
- Features: Business logic and user interactions
- Widgets: Complex UI compositions
- Shared: Reusable infrastructure code
- App: Route definitions and global setup
Root Level Commands:
# Database management
pnpm db:dev # Start PocketBase development server
# Web application
pnpm web:dev # Start Next.js development server
pnpm web:build # Build for production
pnpm web:preview # Preview production build locally
pnpm web:cf-deploy # Deploy to Cloudflare Pages
pnpm web:cf-typegen # Generate Cloudflare types
# Cron service
pnpm cron:dev # Start cron service in development
pnpm cron:build # Build cron service
pnpm cron:start # Start built cron serviceIndividual Package Commands:
# Install dependencies for specific workspace
pnpm --filter web install
# Run scripts in specific workspace
pnpm --filter web dev
pnpm --filter cron build-
Feature Development
- Follow FSD layer principles (as soon as possible)
- Start with entities (domain models)
- Build features (business logic)
- Create widgets (UI compositions)
- Wire modules to pages and layouts which are in app layer
-
Code Organization
- Keep related code together in feature slices
- Maintain strict import dependencies (no upward imports)
- Use TypeScript for type safety
- Follow naming conventions and file structure
-
Quality Assurance
- Use ESLint for code quality
- Follow TypeScript strict mode
- Write meaningful commit messages
- Test features thoroughly before deployment
-
Deployment
- Build and test locally first
- Use provided deployment scripts
- Monitor application performance
- Review and approve community content