title: Lin - LinkedIn Community Manager
sdk: docker
app_file: app.py
license: mit
Lin - Community Manager Assistant for LinkedIn
A comprehensive community management tool that helps you automate and streamline your LinkedIn activities.
π Quick Start
Prerequisites
- Node.js (v16 or higher)
- Python (v3.8 or higher)
- npm (v8 or higher)
Installation
Option 1: Using the root package.json (Recommended)
# Clone the repository
git clone <repository-url>
cd Lin
# Install all dependencies
npm install
# Setup the project
npm run setup
# Start both frontend and backend
npm start
Option 2: Manual installation
# Install frontend dependencies
cd frontend
npm install
# Install backend dependencies
cd ../backend
pip install -r requirements.txt
# Return to root directory
cd ..
π Project Structure
Lin/
βββ package.json # Root package.json with combined scripts
βββ frontend/ # React frontend application
β βββ package.json # Frontend-specific dependencies
β βββ src/ # React source code
β βββ public/ # Static assets
β βββ build/ # Build output
βββ backend/ # Flask backend API
β βββ app.py # Main application file
β βββ requirements.txt # Python dependencies
β βββ api/ # API endpoints
β βββ models/ # Data models
β βββ services/ # Business logic
β βββ utils/ # Utility functions
βββ README.md # This file
π οΈ Development
Available Scripts
From the project root directory, you can use the following commands:
Installation
npm install
- Install root dependenciesnpm run install:frontend
- Install frontend dependenciesnpm run install:backend
- Install backend dependenciesnpm run install:all
- Install all dependenciesnpm run install:all:win
- Install all dependencies (Windows-specific)
Development Servers
npm run dev:frontend
- Start frontend development servernpm run dev:backend
- Start backend development servernpm run dev:all
- Start both servers concurrentlynpm run start
- Alias fornpm run dev:all
npm run start:frontend
- Start frontend onlynpm run start:backend
- Start backend only
Build & Test
npm run build
- Build frontend for productionnpm run build:prod
- Build frontend for productionnpm run preview
- Preview production buildnpm run test
- Run frontend testsnpm run test:backend
- Run backend testsnpm run lint
- Run ESLintnpm run lint:fix
- Fix ESLint issues
Setup & Maintenance
npm run setup
- Full setup (install + build)npm run setup:win
- Full setup (Windows-specific)npm run clean
- Clean build artifactsnpm run reset
- Reset project (clean + install)
Directory Navigation
Important: Most npm commands should be run from the project root directory where the main package.json
is located.
Command Prompt (Windows)
# Navigate to project root (if not already there)
cd C:\Users\YourUser\Documents\Project\Lin_re\Lin
# Install dependencies
npm install
# Start development servers
npm start
# Or start individually
npm run dev:frontend
npm run dev:backend
PowerShell (Windows)
# Navigate to project root (if not already there)
cd C:\Users\YourUser\Documents\Project\Lin_re\Lin
# Install dependencies
npm install
# Start development servers
npm start
# Or start individually
npm run dev:frontend
npm run dev:backend
Linux/macOS
# Navigate to project root (if not already there)
cd /path/to/your/project/Lin
# Install dependencies
npm install
# Start development servers
npm start
# Or start individually
npm run dev:frontend
npm run dev:backend
π§ Environment Setup
Frontend Environment
# Copy environment file
cd frontend
cp .env.example .env.local
# Edit environment variables
# Open .env.local and add your required values
Backend Environment
# Copy environment file
cd backend
cp .env.example .env
# Edit environment variables
# Open .env and add your required values
Required Environment Variables
Frontend (.env.local)
REACT_APP_API_URL
- Backend API URL (default: http://localhost:5000)
Backend (.env)
SUPABASE_URL
- Your Supabase project URLSUPABASE_KEY
- Your Supabase API keyCLIENT_ID
- LinkedIn OAuth client IDCLIENT_SECRET
- LinkedIn OAuth client secretREDIRECT_URL
- LinkedIn OAuth redirect URLHUGGING_KEY
- Hugging Face API keyJWT_SECRET_KEY
- Secret key for JWT token generationSECRET_KEY
- Flask secret keyDEBUG
- Debug mode (True/False)SCHEDULER_ENABLED
- Enable/disable task scheduler (True/False)PORT
- Port to run the application on (default: 5000)
π Development URLs
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
π Troubleshooting
Common Issues
1. ENOENT Error: no such file or directory
Problem: Running npm commands from the wrong directory
Solution: Always run npm commands from the project root directory where package.json
is located
# Check if you're in the right directory
ls package.json
# If not, navigate to the root directory
cd /path/to/project/Lin
2. Port Already in Use
Problem: Port 3000 or 5000 is already in use Solution: Change ports or stop conflicting services
Command Prompt:
# Check what's using port 3000
netstat -ano | findstr :3000
# Check what's using port 5000
netstat -ano | findstr :5000
PowerShell:
# Check what's using port 3000
netstat -ano | Select-String ":3000"
# Check what's using port 5000
netstat -ano | Select-String ":5000"
3. Python/Node.js Not Recognized
Problem: Python or Node.js commands not found Solution: Ensure Python and Node.js are added to your system PATH
Windows:
- Open System Properties > Environment Variables
- Add Python and Node.js installation directories to PATH
- Restart your terminal
4. Permission Issues
Problem: Permission denied errors Solution: Run terminal as Administrator or check file permissions
Windows-Specific Issues
File Copy Commands
Command Prompt:
# Copy frontend environment file
copy frontend\.env.example frontend\.env.local
# Copy backend environment file
copy backend\.env.example backend\.env
PowerShell:
# Copy frontend environment file
Copy-Item frontend\.env.example -Destination frontend\.env.local
# Copy backend environment file
Copy-Item backend\.env.example -Destination backend\.env
Python Installation Issues
# If pip fails, try using python -m pip
cd backend
python -m pip install -r requirements.txt
π Additional Resources
π€ Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Built with React, Flask, and Tailwind CSS
- Powered by Supabase for authentication and database
- LinkedIn API integration for social media management
- Hugging Face for AI-powered content generation