This is a monorepo for a meme search application that uses OCR to recognize text in memes and Elasticsearch to perform efficient text-based searches.
Click the image above to open the video
- OCR Processing: Extract text from memes for indexing.
- Elasticsearch Integration: Quickly search memes by recognized text.
- PostgreSQL Database: Backend data storage.
- Frontend and Backend: Web app with a RESTful API.
- Dockerized Environment: Easy to set up and deploy using Docker Compose.
/app
|- apps
|- backend # Backend service
|- web # Frontend service
|- .env
|- docker-compose.yml
- Docker and Docker Compose installed
All environment variables are defined in a .env
file. Below is a breakdown:
DATABASE_USER=memes
DATABASE_PASSWORD=<secure_password>
DATABASE_NAME=appdb
DATABASE_PORT=5432
DATABASE_URL=postgres://<user>:<password>@db:5432/<database>
JWT_SECRET=<secure_jwt_secret>
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_NODE_URL=http://elasticsearch:9200
BACKEND_PORT=3000
FRONTEND_PORT=3001
NEXT_PUBLIC_BACKEND_URL=http://localhost:3000
UPLOAD_PUBLIC_URL=${NEXT_PUBLIC_BACKEND_URL}/uploads
git clone https://github.com/JefferMarcelino/memes-app.git
cd memes-app
Copy the example below or adjust the provided .env
file:
DATABASE_USER=memes
DATABASE_PASSWORD=<secure_password>
DATABASE_NAME=appdb
DATABASE_PORT=5432
DATABASE_URL=postgres://<user>:<password>@db:5432/<database>
JWT_SECRET=<secure_jwt_secret>
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_NODE_URL=http://elasticsearch:9200
BACKEND_PORT=3000
FRONTEND_PORT=3001
NEXT_PUBLIC_BACKEND_URL=http://localhost:3000
UPLOAD_PUBLIC_URL=${NEXT_PUBLIC_BACKEND_URL}/uploads
docker compose --env-file .env up --build
docker compose --env-file .env up
- Frontend: http://localhost:3001
- Backend API: http://localhost:3000
Feel free to fork this repository and contribute by submitting a pull request.