AI Studio is a comprehensive full-stack application for AI-powered content creation. It features a React frontend and Express backend, offering seamless experience for generating LinkedIn posts, podcasts, and thumbnails.
Generate engaging LinkedIn content instantly with PIN protection to prevent unauthorized posts.
- Input a URL or topic
- Get AI-crafted LinkedIn posts ready for sharing
- 6-digit PIN authentication for secure posting
- Powered by secure backend API
Transform text topics into audio podcasts.
- Enter a topic of interest
- AI generates and converts to audio
- Integrated audio player for listening
Create eye-catching thumbnails for your content.
- Describe your desired image
- AI generates high-quality thumbnails
- Download or regenerate options available
- Frontend: React 19, Vite 7, React Icons
- Backend: Express.js, Node.js
- Styling: CSS (Custom styles)
- State Management: React Hooks
- API: RESTful API with Express
- CORS: Backend-handled with secure configuration
- Authentication: PIN-based for LinkedIn posts
ai-studio/
βββ client/ # React Frontend (Port 5173)
β βββ src/
β β βββ components/
β β βββ styles/
β β βββ App.jsx
β βββ package.json
β
βββ server/ # Express Backend (Port 5000)
β βββ src/
β β βββ routes/
β β βββ config/
β β βββ middleware/
β β βββ index.js
β βββ package.json
β
βββ package.json # Root workspace config
- Node.js v18 or higher
- npm or yarn
# 1. Clone the repository
git clone <repository-url>
cd ai-studio
# 2. Install all dependencies
npm run install:all# Run both client (5173) and server (5000) simultaneously
npm run devOr run them separately:
# Terminal 1 - Backend (Port 5000)
npm run dev:server
# Terminal 2 - Frontend (Port 5173)
npm run dev:clientThen open http://localhost:5173 in your browser.
- GET
/api/health- Backend status
All endpoints are under /api/webhook/:
-
LinkedIn Post Generator (PIN Protected)
POST /api/webhook/social-media Body: { "text": "url_or_content", "pin": "6-digit pin" } Response: Success or PIN validation errorRequires 6-digit PIN for authentication.
-
Podcast Generator
POST /api/webhook/podcast Body: { "text": "topic" } Response: { "audioFile": "url" } -
Thumbnail Generator
POST /api/webhook/thumbnail Body: { "text": "prompt" } Response: Image URL
VITE_API_URL=http://localhost:5000 # Backend URLPORT=5000
NODE_ENV=development
FRONTEND_URL=http://localhost:5173 # For CORS
SOCIAL_MEDIA_PIN=123456 # 6-digit PIN for LinkedIn posts# Build frontend only (server doesn't need building)
npm run build
# Or individually
npm run build:client- Sign up at railway.app
- Create new project β Deploy from GitHub
- Select
/serveras root directory - Add environment variables:
PORT=5000 NODE_ENV=production FRONTEND_URL=https://your-app.vercel.app SOCIAL_MEDIA_PIN=your-secure-6-digit-pin
- Sign up at render.com
- New Web Service β Connect GitHub repo
- Configure settings:
- Root Directory:
server - Build Command:
npm install - Start Command:
npm start
- Root Directory:
- Add environment variables:
PORT=5000 NODE_ENV=production FRONTEND_URL=https://your-app.vercel.app SOCIAL_MEDIA_PIN=your-secure-6-digit-pin
- Deploy at vercel.com
- New Project β Import GitHub repo
- Build settings:
- Framework Preset: Other
- Build Command:
npm run build:client - Output Directory:
client/dist
- Environment variables:
(Replace with your Render/Railway backend URL)
VITE_API_URL=https://your-backend-url.onrender.com
- Backend CORS: Secure configuration supporting development and production URLs
- PIN Authentication: 6-digit PIN protection for LinkedIn posts to prevent unauthorized posting
- Set
FRONTEND_URLenvironment variable for production CORS - Set
SOCIAL_MEDIA_PINenvironment variable for LinkedIn security
# Root Level
npm run dev # Run client & server
npm run dev:client # Frontend only
npm run dev:server # Backend only
npm run build # Build both
npm run start # Start production server
# Individual (cd client or cd server)
npm run dev # Development
npm run build # Production build
npm start # Start (server only)
npm run lint # Linting (client only)- Verify
VITE_API_URLin client.env.localmatches backend URL - Check
FRONTEND_URLin backend.envfor allowed origins
- Ensure backend runs on port 5000:
GET http://localhost:5000/api/health - Check frontend runs on port 5173
- LinkedIn post returns 401 error: Verify
SOCIAL_MEDIA_PINis set in backend.env - Ensure PIN is exactly 6 digits
- Check PIN modal is displayed before posting
- Verify PIN entered matches the configured PIN in backend
rm -rf node_modules client/node_modules server/node_modules
npm run install:all- Create feature branch:
git checkout -b feature/name - Commit:
git commit -m "feat: description" - Push:
git push origin feature/name - Open Pull Request
ISC
Deployed at: https://ai-studio-client.vercel.app/