Market Spark este o platformă avansată de marketing digital care oferă servicii complete de marketing bazate pe analiza site-ului web al utilizatorului. Aplicația oferă funcționalități complete pentru:
- Analiza site-ului: Scraping automat al site-ului web al utilizatorului pentru a înțelege conținutul și structura
- Generarea de persoane: Crearea de buyer personas personalizate folosind AI bazat pe analiza site-ului
- Strategii de marketing: Dezvoltarea de strategii personalizate bazate pe conținutul site-ului
- Generarea de conținut: Crearea automată de postări și imagini cu AI inspirate din site-ul utilizatorului
- Postare automată: Integrare cu Facebook pentru postarea automată a conținutului generat
Platforma analizează site-ul web al utilizatorului și generează automat întregul plan de marketing - de la persoanele țintă până la conținutul pentru social media. Este construită cu Django și PostgreSQL, rulează în containere Docker și integrează API-uri moderne pentru generarea de conținut și analiza datelor.
Market Spark is an advanced digital marketing platform that provides comprehensive marketing services based on analysis of the user's website. The application offers complete functionality for:
- Website Analysis: Automated scraping of the user's website to understand content and structure
- Persona Generation: AI-powered creation of customized buyer personas based on website analysis
- Marketing Strategies: Development of personalized strategies based on website content
- Content Generation: Automated creation of posts and images using AI inspired by the user's website
- Auto Posting: Facebook integration for automatic posting of generated content
The platform analyzes the user's website and automatically generates the entire marketing plan - from target personas to social media content. It is built with Django and PostgreSQL, runs in Docker containers, and integrates modern APIs for content generation and data analysis.
- Docker and Docker Compose installed
- Git
- At least 4GB RAM available
git clone git@github.com:Nicu106/26-Team.git
cd team26# Automatic setup (recommended)
./setup-env.sh
# OR manual setup
cp env.example .env# Build and start all containers
docker-compose up --buildThat's it! 🎉
The startup script will automatically:
- ✅ Wait for the database to be ready
- ✅ Run all migrations
- ✅ Create a superuser from environment variables
- ✅ Start the Django server
- Main Application: http://localhost:8000/
- Django Admin: http://localhost:8000/admin/
- Username: admin (configurable in .env)
- Password: admin123 (configurable in .env)
# PostgreSQL Database Configuration
POSTGRES_DB=django_db
POSTGRES_USER=django_user
POSTGRES_PASSWORD=django_pass
# Django Configuration
DJANGO_SECRET_KEY=your-secret-key-here
DJANGO_DEBUG=True
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0
# Database Connection
DB_ENGINE=django.db.backends.postgresql
DB_HOST=db
DB_PORT=5432
# Admin User Configuration
ADMIN_USERNAME=admin
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=admin123
# Application Settings
APP_NAME=Team26 Django App
APP_VERSION=1.0.0
TIME_ZONE=UTC
LANGUAGE_CODE=en-us
# Development Settings
DEVELOPMENT_MODE=True
LOG_LEVEL=DEBUG
# Facebook Integration (for auto-posting)
FACEBOOK_ACCESS_TOKEN=your_facebook_access_token
FACEBOOK_PAGE_ID=your_facebook_page_id
# OpenAI Integration (for AI content generation)
OPENAI_API_KEY=your_openai_api_key-
Change admin password:
ADMIN_PASSWORD=your_secure_password
-
Change database name:
POSTGRES_DB=your_database_name
-
Disable debug mode:
DJANGO_DEBUG=False
For Facebook auto-posting functionality, you need to expose your local Django server to the internet using ngrok. Facebook requires publicly accessible URLs for images.
# Download and install ngrok
# Visit: https://ngrok.com/download
# Or install via Homebrew (macOS)
brew install ngrok# Get your auth token from https://dashboard.ngrok.com/get-started/your-authtoken
ngrok config add-authtoken YOUR_AUTH_TOKEN# Start tunnel on port 8000 (Django server port)
ngrok http 8000After starting ngrok, you'll get a public URL like https://abc123.ngrok-free.app. Add this to your Django settings:
# In web/settings.py
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1',
'0.0.0.0',
'abc123.ngrok-free.app', # Add your ngrok URL here
]# Restart the web container to apply settings changes
docker-compose restart webNow you can run the Facebook posting script:
docker-compose run web python post_to_facebook.pyNote: Keep ngrok running while using Facebook posting functionality. The ngrok URL changes each time you restart ngrok unless you have a paid plan.
docker-compose up -d --builddocker-compose downdocker-compose down -vdocker-compose logs web
docker-compose logs dbdocker-compose run web python manage.py shelldocker-compose run web python manage.py createsuperuser./setup-env.shdocker-compose run web python post_to_facebook.py- Type: PostgreSQL 15
- Host: localhost:5432
- Database: django_db (configurable)
- User: django_user (configurable)
- Password: django_pass (configurable)
team26/
├── docker-compose.yml
├── Dockerfile
├── requirements.txt
├── env.example
├── setup-env.sh
├── startup.sh
├── manage.py
├── README.md
├── auth_app/ ← Main Django app
│ ├── models.py
│ ├── views.py
│ ├── urls.py
│ ├── forms.py
│ ├── facebook_poster.py
│ ├── image_generator.py
│ └── templates/
├── web/ ← Django project settings
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── media/ ← Generated images
├── templates/ ← HTML templates
└── staticfiles/ ← Static files
- Ensure Docker and Docker Compose are installed and running
- Port 8000 must be free for the Django application
- Port 5432 must be free for PostgreSQL
- First run may take longer due to Docker image downloads
- Superuser is automatically created on first run from environment variables
- All settings are configurable through the
.envfile - For Facebook auto-posting, you need a valid Facebook access token
- For AI content generation, you need a valid OpenAI API key
- The platform analyzes your own website to generate marketing content
- All marketing strategies are personalized based on your website content
- Facebook posting requires ngrok for public URL access
- Keep ngrok running while using Facebook posting functionality
# Check Docker status
docker --version
docker-compose --version
# Restart Docker Desktop# Check what's running on ports
lsof -i :8000
lsof -i :5432
# Modify ports in docker-compose.yml if necessary# Remove volumes and start fresh
docker-compose down -v
docker-compose up --build# Stop and remove everything
docker-compose down -v# 1. Check if ngrok is running
ngrok http 8000
# 2. Update ALLOWED_HOSTS in web/settings.py with ngrok URL
# Add your ngrok URL to ALLOWED_HOSTS list
# 3. Restart Django server
docker-compose restart web
# 4. Test image accessibility
curl -I https://your-ngrok-url.ngrok-free.app/media/generated_images/your-image.jpg
# 5. Run Facebook posting script
docker-compose run web python post_to_facebook.py# Check ngrok status
ngrok status
# Restart ngrok tunnel
ngrok http 8000
# Verify tunnel is active
curl https://your-ngrok-url.ngrok-free.app/- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.