Skip to content

Meme search application that uses OCR to recognize text in memes and Elasticsearch to perform efficient text-based searches

Notifications You must be signed in to change notification settings

JefferMarcelino/memes-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meme Search App

About The Project

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.

Preview

Meme Search Demo

Click the image above to open the video

Tech stack

NextJS Official Website TailwindCSS Official Website TypeScript Official Website NestJS Official Website Elasticsearch Official Website Docker Official Website Prisma Official Website PostgreSQL Official Website

Features

  • 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.

Directory Structure

/app
  |- apps
      |- backend   # Backend service
      |- web       # Frontend service
  |- .env
  |- docker-compose.yml

Prerequisites

  • Docker and Docker Compose installed

Environment Variables

All environment variables are defined in a .env file. Below is a breakdown:

Database Configuration

DATABASE_USER=memes
DATABASE_PASSWORD=<secure_password>
DATABASE_NAME=appdb
DATABASE_PORT=5432
DATABASE_URL=postgres://<user>:<password>@db:5432/<database>

JWT Secret

JWT_SECRET=<secure_jwt_secret>

Elasticsearch Configuration

ELASTICSEARCH_PORT=9200
ELASTICSEARCH_NODE_URL=http://elasticsearch:9200

Backend Configuration

BACKEND_PORT=3000

Frontend Configuration

FRONTEND_PORT=3001
NEXT_PUBLIC_BACKEND_URL=http://localhost:3000

Upload Configuration

UPLOAD_PUBLIC_URL=${NEXT_PUBLIC_BACKEND_URL}/uploads

Getting Started

1. Clone the Repository

git clone https://github.com/JefferMarcelino/memes-app.git
cd memes-app

2. Create and Configure .env

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

3. Build and Run the Services

Build and Run

docker compose --env-file .env up --build

Run without Rebuilding

docker compose --env-file .env up

4. Access the Application

Contributing

Feel free to fork this repository and contribute by submitting a pull request.


About

Meme search application that uses OCR to recognize text in memes and Elasticsearch to perform efficient text-based searches

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published