An open API service indexing awesome lists of open source software.

https://github.com/dragonscypher/autofile

๐Ÿค– AI-Powered Recruitment Assistant - Automate resume screening, ATS scoring, and interview generation with Next.js, Prisma, and Ollama
https://github.com/dragonscypher/autofile

ai ats nextjs15 ollama postgresql prisma reactjs recruitment tailwindcss typescript

Last synced: 3 months ago
JSON representation

๐Ÿค– AI-Powered Recruitment Assistant - Automate resume screening, ATS scoring, and interview generation with Next.js, Prisma, and Ollama

Awesome Lists containing this project

README

          

# ๐Ÿค– Autofile - AI Recruitment Assist ๐ŸŽฏ Getting Started

## ๐Ÿ“ Project Structure

```
Autofile/
โ”œโ”€โ”€ apps/
โ”‚ โ”œโ”€โ”€ web/ # ๐ŸŒ Main Next.js application
โ”‚ โ””โ”€โ”€ workers/ # โš™๏ธ Background job processing
โ”‚
โ”œโ”€โ”€ packages/
โ”‚ โ”œโ”€โ”€ ats/ # ๐Ÿ“Š Resume scoring logic
โ”‚ โ”œโ”€โ”€ llm/ # ๐Ÿค– AI provider integrations (Ollama)
โ”‚ โ””โ”€โ”€ utils/ # ๐Ÿ› ๏ธ Helper functions (text extraction, parsing)
โ”‚
โ”œโ”€โ”€ prisma/ # ๐Ÿ—„๏ธ Database schema
โ”œโ”€โ”€ infra/ # ๐Ÿณ Docker setup (PostgreSQL, Redis)
โ””โ”€โ”€ test-data/ # ๐Ÿ“„ Sample data for testing
```

## ๐Ÿงช Testing it

### Prerequisites
- ๐Ÿ“ฆ Node.js
- ๐Ÿ“ฆ pnpm package manager (`npm install -g pnpm`)
- ๐Ÿณ Docker Desktop (for PostgreSQL and Redis)
- ๐Ÿค– Ollama with llama3 (optional, for enhanced AI features)

### Quick Setup![Next.js](https://img.shields.io/badge/Next.js-14.2.5-black?style=flat-square&logo=next.js)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-blue?style=flat-square&logo=postgresql)](https://www.postgresql.org/)
[![Prisma](https://img.shields.io/badge/Prisma-5.22-2D3748?style=flat-square&logo=prisma)](https://www.prisma.io/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)

> A smart recruitment system that helps you screen resumes, shortlist candidates, and generate interview questions using AI.

## โœจ What does it do?

Autofile streamlines your hiring process by:
- ๐Ÿ“Š **Automatically scoring resumes** against job descriptions
- ๐ŸŽฏ **Shortlisting candidates** based on customizable thresholds
- ๐Ÿ’ฌ **Generating relevant interview questions** with unique keywords and model answers
- ๐Ÿ“ **Helping you evaluate candidates** systematically
- ๐Ÿ“„ **Supporting multiple file formats** (PDF, DOC, DOCX, TXT)

Think of it as your AI-powered hiring assistant that handles the tedious parts of recruitment.

## ๐Ÿš€ Features

- โœ… **Smart ATS Scoring** - AI-powered resume analysis with LLM or baseline algorithms
- โœ… **File Upload Support** - PDF, DOC, DOCX, and TXT file handling
- โœ… **Interview Generation** - Context-aware questions with realistic model answers
- โœ… **Keyword Extraction** - Unique, relevant keywords per question (no duplicates!)
- โœ… **Real-time Logging** - Comprehensive debugging and monitoring
- โœ… **Monorepo Architecture** - Clean separation of concerns with Turborepo
- โœ… **Type-Safe** - Full TypeScript implementation
- โœ… **Production Ready** - Docker setup included

## ๐ŸŽฏ Getting Started

### What you'll need
- Node.js 18 or higher (I'm using 20)
- pnpm package manager
- Docker Desktop (for the database)
- Optionally: Ollama with llama3 for enhanced AI features

### Quick setup

1. **Install dependencies**
```bash
pnpm install
```

2. **Start the database**
```bash
cd infra
docker compose up -d db redis
```

3. **Set up the database schema**
```bash
pnpm prisma generate
pnpm prisma migrate dev --name init
```

4. **Build the packages**
```bash
pnpm -r build
```

5. **Start the dev server**
```bash
cd apps/web
pnpm dev
```

Open http://localhost:3000 and you're ready to go! ๐ŸŽ‰

## ๐Ÿ“– How it works

The workflow is intuitive and straightforward:

1. ๐Ÿ“‹ **Create a project** with your job description and requirements
2. ๐Ÿ“ค **Upload resumes** (PDF, DOC, DOCX, or TXT) or paste text
3. ๐ŸŽš๏ธ **Set a threshold** (e.g., 75%) for automatic filtering
4. ๐Ÿ‘ฅ **Review shortlisted candidates** who meet your criteria
5. ๐Ÿ’ก **Generate interview questions** tailored to the role with AI
6. โญ **Score candidates** using keyword matching and manual evaluation
7. โœ… **Select finalists** based on your cutoff score

## ๐Ÿ“ Project Structure

```
Autofile/
โ”œโ”€โ”€ apps/
โ”‚ โ”œโ”€โ”€ web/ # The main Next.js application
โ”‚ โ””โ”€โ”€ workers/ # Background job processing
โ”‚
โ”œโ”€โ”€ packages/
โ”‚ โ”œโ”€โ”€ ats/ # Resume scoring logic
โ”‚ โ”œโ”€โ”€ llm/ # AI provider integrations
โ”‚ โ””โ”€โ”€ utils/ # Helper functions
โ”‚
โ”œโ”€โ”€ prisma/ # Database schema
โ”œโ”€โ”€ infra/ # Docker setup
โ””โ”€โ”€ test-data/ # Sample data for testing
```

## ๐Ÿงช Testing it out

I've included some mock data in the `test-data/` folder so you can try it without real resumes:
- ๐Ÿ“ One job description for a Senior Software Engineer role
- ๐Ÿ‘” Five sample resumes with varying qualification levels

Just copy-paste the text into the application to see how it works!

## ๐Ÿ› ๏ธ Tech Stack

Built with modern, reliable tools:
- **Next.js 14** - React framework with App Router
- **Prisma** + **PostgreSQL** - Type-safe ORM and database
- **Redis** - Caching and session management
- **Ollama** (optional) - Local AI inference with llama3
- **Tailwind CSS** - Utility-first styling
- **TypeScript** - Full type safety throughout
- **Turborepo** - Monorepo build system
- **Docker** - Containerized infrastructure

## โš™๏ธ Environment Setup

Create a `.env.local` file in `apps/web/` with:

```env
# Database
DATABASE_URL="postgresql://user:pass@localhost:5432/autofile"

# Redis
REDIS_URL="redis://localhost:6379"

# NextAuth (generate a secret: openssl rand -base64 32)
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-here"

# Ollama (optional - for AI features)
OLLAMA_HOST="http://localhost:11434"
OLLAMA_MODEL="llama3"
```

> **โš ๏ธ Security Note:** Never commit `.env` files to version control! They are automatically ignored by `.gitignore`.

## ๐Ÿ› Troubleshooting

**Database connection fails?**
Make sure Docker is running and the containers are up:
```bash
docker compose ps
```

**Ollama not found?**
No problem! The system falls back to a baseline TF-IDF algorithm that works great for most cases.

**Port 3000 already in use?**
You can change the port in the dev command:
```bash
next dev -p 3001
```

**Text extraction errors?**
TXT files are now fully supported. Check `TXT-FILE-FIX.md` for implementation details.

## ๐Ÿš€ Recent Improvements

- โœ… **Interview Generation** - Unique keywords per question, no duplicates
- โœ… **Realistic Model Answers** - Specific examples with metrics instead of templates
- โœ… **TXT File Support** - Direct text extraction without external dependencies
- โœ… **Enhanced Logging** - Comprehensive debugging throughout the application
- โœ… **Custom Icons** - No external icon dependencies, faster load times

See `INTERVIEW-IMPROVEMENTS.md` and `CHANGES.md` for detailed documentation.

## ๐ŸŽฏ Roadmap

## ๐ŸŽฏ Roadmap

This is a working prototype with all core features implemented. Future enhancements could include:

- ๐Ÿ“ง Email notifications for candidates
- ๐Ÿ‘ฅ Team collaboration features
- ๐Ÿ”— Integration with job boards (LinkedIn, Indeed)
- ๐Ÿ“น Video interview scheduling
- ๐Ÿ“Š Advanced analytics dashboard
- ๐ŸŒ Multi-language support
- ๐Ÿ” Role-based access control
- ๐Ÿ“ฑ Mobile-responsive improvements

## ๐Ÿค Contributing

Found a bug or have an idea? Contributions are welcome!

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

Please read `CONTRIBUTING.md` for details on our code of conduct and development process.

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- Built with [Next.js](https://nextjs.org/)
- Powered by [Ollama](https://ollama.ai/) for local AI inference
- Database management by [Prisma](https://www.prisma.io/)
- Icons created as custom SVG components

## ๐Ÿ“š Documentation

- `GETTING-STARTED.md` - Detailed setup guide
---

**Built with curiosity and lots of coffee โ˜•**

*Automate your recruitment, focus on what matters - finding the right talent.*