Linked-Out is a powerful API service that allows users to analyze, search, and interact with web content using advanced AI capabilities. It combines web scraping, semantic search, and Retrieval Augmented Generation (RAG) to provide intelligent responses about web content.
- π User authentication and authorization
- π Web content scraping and storage
- π Semantic search across stored content
- π¬ AI-powered chat interface with web content
- π Elasticsearch for efficient content indexing
- π§ Groq-powered RAG for intelligent responses
- π Real-time content processing
- Docker and Docker Compose
- Python 3.8+
- pip (Python package manager)
- Git
linked-out/
βββ app.py # Main Flask application
βββ requirements.txt # Python dependencies
βββ .env # Environment variables
βββ API_REFERENCE.md # API documentation
βββ README.md # Project documentation
git clone <repository-url>
cd linked-outCreate a .env file in the project root with the following variables:
ELASTIC_PASSWORD=your_elastic_password
ELASTIC_CERT_PATH=/path/to/elastic/cert
ELASTIC_HOST=localhost
ELASTIC_PORT=9200
ELASTIC_USE_SSL=true
GROQ_API_KEY=your_groq_api_key
JWT_SECRET_KEY=your_jwt_secret# Create a directory for Elasticsearch data
mkdir -p elasticsearch/data
# Start Elasticsearch container
docker run -d \
--name elasticsearch \
-p 9200:9200 \
-p 9300:9300 \
-e "discovery.type=single-node" \
-e "xpack.security.enabled=true" \
-e "ELASTIC_PASSWORD=your_elastic_password" \
-v $(pwd)/elasticsearch/data:/usr/share/elasticsearch/data \
docker.elastic.co/elasticsearch/elasticsearch:8.12.0# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Generate Elasticsearch certificates
docker exec -it elasticsearch bin/elasticsearch-certutil ca
docker exec -it elasticsearch bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
# Copy certificates to your local machine
docker cp elasticsearch:/usr/share/elasticsearch/elastic-certificates.p12 ./elastic-certificates.p12# Start the Flask application
python app.pyThe API will be available at http://localhost:8888
curl -X POST http://localhost:8888/api/register \
-H "Content-Type: application/json" \
-d '{
"username": "testuser",
"email": "test@example.com",
"password": "password123",
"confirm_password": "password123"
}'curl -X POST http://localhost:8888/api/login \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "password123"
}'curl -X POST http://localhost:8888/api/urls \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com"
}'curl -X POST http://localhost:8888/api/chat \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"query": "What is this website about?"
}'# Install test dependencies
pip install -r requirements-dev.txt
# Run tests
python -m pytestThis project follows PEP 8 style guidelines. Use the following tools to maintain code quality:
# Install development dependencies
pip install -r requirements-dev.txt
# Run linter
flake8
# Run formatter
black .- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue in the GitHub repository or contact the maintainers.
- Elasticsearch for powerful search capabilities
- Groq for high-performance AI inference
- Flask for the web framework
- All contributors and maintainers

