This is a universal file search application that indexes and searches for files across different locations, including local storage and cloud services.
- Index files in a user's
C:/Usersdirectory. - Search files efficiently using Elasticsearch.
- Open file locations directly from the app.
- User authentication via JWT.
Before running the application, ensure you have the following installed:
- Python 3.8+
- Docker & Docker Compose
- Node.js (only for frontend development)
- Elasticsearch
- PostgreSQL
git clone https://github.com/Servesh21/file_search1.git
cd file_search1Create a .env file in the root directory and add the following environment variables:
# Flask Configuration
FLASK_APP=app.py
FLASK_ENV=development
SECRET_KEY=your_secret_key_here
# Database Configuration
DATABASE_URL=postgresql://username:password@localhost:5432/file_search_db
# Elasticsearch Configuration
ELASTICSEARCH_URL=http://localhost:9200
# JWT Authentication
JWT_SECRET_KEY=your_jwt_secret_here
Modify the values as per your setup.
To start the application along with Elasticsearch and PostgreSQL, run:
docker-compose up -dThis will launch the required services in the background.
To initialize the database, run:
flask db upgradeflask runBy default, the server runs at http://127.0.0.1:5000/.
If you are working on the frontend, navigate to the frontend directory and run:
npm install
npm run devThis starts the frontend development server at http://localhost:5173/.
- Click Reindex Files to index files from the
C:/Usersdirectory. - Use the search bar to find files.
- Click on a file to open its location.
- If Elasticsearch is not running, restart it using:
docker-compose restart elasticsearch
- If the database connection fails, ensure PostgreSQL is running and check
DATABASE_URLin.env. - For any other issues, check logs using:
docker-compose logs -f