Skip to content

Commit dba73fe

Browse files
committed
docs: add CI badges, CONTRIBUTING guide and OCI image labels
1 parent 9facae7 commit dba73fe

4 files changed

Lines changed: 117 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Contributing to From Zero RAG
2+
3+
Thanks for your interest in contributing! This is primarily a learning project, but improvements, bug fixes and ideas are welcome.
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- [Node.js 20+](https://nodejs.org/)
10+
- [pnpm 10+](https://pnpm.io/)`npm install -g pnpm`
11+
- [Docker + Docker Compose](https://docs.docker.com/get-docker/)
12+
- An Ollama instance or API key for Google/OpenAI embeddings
13+
14+
### Local Setup
15+
16+
```bash
17+
# 1. Clone the repo
18+
git clone https://github.com/albegosu/from-zero-rag.git
19+
cd from-zero-rag
20+
21+
# 2. Install dependencies (all workspace packages)
22+
pnpm install
23+
24+
# 3. Start the backend services (DB + Ollama)
25+
docker compose --profile api up -d
26+
27+
# 4. Set up environment for the API
28+
cp rag-api/.env.example rag-api/.env
29+
# Edit rag-api/.env with your settings
30+
31+
# 5. Run database migrations
32+
cd rag-api && npx prisma migrate dev && cd ..
33+
34+
# 6. Start everything in dev mode
35+
pnpm dev
36+
```
37+
38+
## Project Structure
39+
40+
```
41+
from-zero-rag/
42+
├── rag-api/ # NestJS backend (RAG pipeline, vector search)
43+
├── rag-ui/ # Nuxt 3 frontend (chat, document management)
44+
├── packages/
45+
│ ├── rag-learning/ # Shared challenge/validator library
46+
│ └── rag-playground/ # Interactive learning UI
47+
└── docker-compose.yml # Full stack orchestration
48+
```
49+
50+
## Development Workflow
51+
52+
1. **Fork** the repository
53+
2. **Create a branch** from `main`: `git checkout -b feat/your-feature`
54+
3. **Make your changes** and add tests if applicable
55+
4. **Run the checks** before pushing:
56+
57+
```bash
58+
# Backend tests
59+
cd rag-api && pnpm test
60+
61+
# Backend lint
62+
cd rag-api && pnpm lint
63+
64+
# Learning package build
65+
pnpm --filter @rag/learning build
66+
```
67+
68+
5. **Open a pull request** against `main` — CI will run automatically
69+
70+
## Branch Naming
71+
72+
| Type | Pattern | Example |
73+
|------|---------|---------|
74+
| Feature | `feat/short-description` | `feat/streaming-responses` |
75+
| Bug fix | `fix/short-description` | `fix/chunking-offset` |
76+
| Docs | `docs/short-description` | `docs/api-endpoints` |
77+
| Chore | `chore/short-description` | `chore/update-deps` |
78+
79+
## Commit Style
80+
81+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
82+
83+
```
84+
feat: add streaming support for chat responses
85+
fix: correct chunk offset calculation for unicode text
86+
docs: add deployment guide for Railway
87+
chore: update pnpm lockfile
88+
```
89+
90+
## What to Contribute
91+
92+
- **Bug fixes** — especially around chunking accuracy, embedding edge cases
93+
- **New validators** for the learning playground challenges
94+
- **Documentation** improvements and clarifications
95+
- **Tests** — the backend test coverage can always grow
96+
- **UI/UX** improvements for the chat or document management views
97+
98+
## Questions?
99+
100+
Open an [issue](https://github.com/albegosu/from-zero-rag/issues) with your question or idea before starting large changes — it helps align effort.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
A production-ready full-stack application for AI-powered **Retrieval-Augmented Generation (RAG)**. Built to demonstrate modern RAG architecture, vector databases, and cloud-native deployment.
44

5+
[![CI Backend](https://github.com/albegosu/from-zero-rag/actions/workflows/test-backend.yml/badge.svg)](https://github.com/albegosu/from-zero-rag/actions/workflows/test-backend.yml)
6+
[![CI Frontend](https://github.com/albegosu/from-zero-rag/actions/workflows/test-frontend.yml/badge.svg)](https://github.com/albegosu/from-zero-rag/actions/workflows/test-frontend.yml)
7+
[![CI Learning](https://github.com/albegosu/from-zero-rag/actions/workflows/test-learning.yml/badge.svg)](https://github.com/albegosu/from-zero-rag/actions/workflows/test-learning.yml)
8+
[![Docker Build](https://github.com/albegosu/from-zero-rag/actions/workflows/docker-build.yml/badge.svg)](https://github.com/albegosu/from-zero-rag/actions/workflows/docker-build.yml)
9+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10+
[![Node.js](https://img.shields.io/badge/Node.js-20-brightgreen)](https://nodejs.org/)
511
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
612
[![NestJS](https://img.shields.io/badge/NestJS-10.3-red)](https://nestjs.com/)
713
[![Nuxt](https://img.shields.io/badge/Nuxt-3-green)](https://nuxt.com/)
814
[![pgvector](https://img.shields.io/badge/pgvector-0.5-purple)](https://github.com/pgvector/pgvector)
15+
[![pnpm](https://img.shields.io/badge/pnpm-workspace-orange)](https://pnpm.io/)
916

1017
---
1118

rag-api/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ FROM node:20-alpine AS runner
2222
RUN apk add --no-cache libc6-compat openssl curl
2323
WORKDIR /app
2424

25+
LABEL org.opencontainers.image.title="from-zero-rag backend" \
26+
org.opencontainers.image.description="NestJS RAG API — document ingestion, vector search, embeddings and chat with pgvector + Ollama" \
27+
org.opencontainers.image.source="https://github.com/albegosu/from-zero-rag" \
28+
org.opencontainers.image.licenses="MIT"
29+
2530
ENV NODE_ENV=production
2631

2732
# Install Prisma CLI for migrations

rag-ui/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ RUN npm run build
2121
FROM node:20-alpine AS runner
2222
WORKDIR /app
2323

24+
LABEL org.opencontainers.image.title="from-zero-rag frontend" \
25+
org.opencontainers.image.description="Nuxt 3 UI — chat interface, document management and RAG search for from-zero-rag" \
26+
org.opencontainers.image.source="https://github.com/albegosu/from-zero-rag" \
27+
org.opencontainers.image.licenses="MIT"
28+
2429
ENV NODE_ENV=production
2530

2631
# Copy built files

0 commit comments

Comments
 (0)