Emomo is a meme search engine application that allows users to find memes using semantic search queries. This frontend application provides a responsive and interactive user interface for searching, browsing, and viewing memes.
- Semantic Search: Find memes by describing them in natural language (e.g., "happy cat", "surprised dog").
- Meme Grid: Browse search results or recommended memes in a responsive grid layout.
- Detailed View: View high-resolution memes in a modal with metadata (tags, source, description).
- Interactive UI: Animated transitions and hover effects using Framer Motion.
- Recommendations: Displays recommended memes on the home page.
- Copy & Download: Easily copy image links or download memes directly.
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone <repository-url> cd emomo-frontend-temp
-
Install dependencies:
npm install
-
Configure environment variables: Copy
.env.exampleto.envand update the values if necessary.cp .env.example .env
VITE_API_BASE: The base URL of the backend API (default:http://localhost:8080/api/v1).VITE_API_TOKEN: (Optional) API token for authentication.
To start the development server with Hot Module Replacement (HMR):
npm run devOpen your browser and navigate to http://localhost:5173 (or the port shown in the terminal).
To build the application for production:
npm run buildThe output will be in the dist/ directory.
To preview the production build locally:
npm run previewTo run ESLint and check for code quality issues:
npm run lintTo run End-to-End (E2E) tests using Playwright:
# Run tests in headless mode
npm run test
# Run tests with UI runner
npm run test:ui
# Run tests in headed browser mode
npm run test:headedsrc/
├── api/ # API client and service functions
├── assets/ # Static assets (images, icons)
├── components/ # React components
│ ├── Header.tsx # App header
│ ├── SearchHero.tsx # Search bar section
│ ├── MemeCard.tsx # Individual meme card
│ ├── MemeGrid.tsx # Grid of meme cards
│ ├── MemeModal.tsx # Detail view modal
│ └── ...
├── types/ # TypeScript type definitions
├── App.tsx # Main application component
├── main.tsx # Entry point
└── ...
- Fork the repository.
- Create a new branch (
git checkout -b feature/amazing-feature). - Make your changes.
- Commit your changes (
git commit -m 'feat: Add some amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.