Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ coverage
.cache
.DS_Store
*.log
node_modules
dist
tests
.vscode
.idea
*.swp
*.swo
*~
46 changes: 27 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,46 +1,54 @@
FROM node:20-alpine AS builder

# ---------------------------
# Builder Stage
# ---------------------------
FROM node:22-alpine AS builder
WORKDIR /app

# Install deps
RUN apk update && apk add --no-cache \
bash \
chromium \
chromium-chromedriver \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
&& apk add --no-cache --virtual .build-deps \
gcc g++ make python3 && \
npm install -g cross-env

COPY package*.json ./
RUN npm ci

# Copy source code
COPY . .

# Build app
RUN npm run build
RUN npm run build:cli

FROM node:20-alpine AS production

# ---------------------------
# Runtime Stage
# ---------------------------
FROM node:22-alpine AS runtime
WORKDIR /app

# Install dependencies needed for Puppeteer
RUN apk add --no-cache \
RUN apk update && apk add --no-cache \
chromium \
chromium-chromedriver \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser \
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 \
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser \
NODE_ENV=production

# Copy package.json dan node_modules hasil build
COPY package*.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/src/data ./src/data

# Create necessary directories
RUN mkdir -p logs storage

# Expose port
EXPOSE 3001

# Default command
CMD ["npm", "start"]
CMD ["npm", "start"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="https://www.typescriptlang.org/"><img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-Ready-blue.svg"></a>
<a href="https://nodejs.org/"><img alt="Node.js" src="https://img.shields.io/badge/Node.js-20+-green.svg"></a>
<br/>
<a href="https://pptr.dev/"><img alt="Puppeteer" src="https://img.shields.io/badge/Puppeteer-Web%20Automation-orange.svg"></a>
<a href="https://playwright.dev/"><img alt="Playwright" src="https://img.shields.io/badge/Playwright-Web%20Automation-orange.svg"></a>
<a href="https://github.com/dequelabs/axe-core"><img alt="axe-core" src="https://img.shields.io/badge/axe--core-Accessibility-red.svg"></a>
<a href="https://expressjs.com/"><img alt="Express" src="https://img.shields.io/badge/Express-API%20Framework-lightgrey.svg"></a>
</p>
Expand Down Expand Up @@ -937,7 +937,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
## 🙏 Acknowledgments

- [axe-core](https://github.com/dequelabs/axe-core) for accessibility testing
- [Puppeteer](https://github.com/puppeteer/puppeteer) for web automation
- [Playwright](https://github.com/microsoft/playwright) for web automation
- [Express.js](https://expressjs.com/) for the web framework
- [OpenAI](https://openai.com/) for AI-powered accessibility analysis
- [Docker](https://www.docker.com/) for containerization
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

services:
lenscore-init:
build:
Expand Down Expand Up @@ -36,7 +34,7 @@ services:
- ./cache:/app/cache
- ./web:/app/web
- ./storage:/app/storage
- node_modules_data:/app/node_modules
- ./.lenscore/web:/app/.lenscore/web
depends_on:
- redis

Expand Down
2 changes: 1 addition & 1 deletion docs/en/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Welcome to LensCore! This guide will help you get up and running with our access
LensCore is an open-source platform that combines:

- **Accessibility Testing** powered by axe-core
- **Intelligent Web Crawling** with Puppeteer
- **Intelligent Web Crawling** with Playwright
- **AI-Enhanced Analysis** using OpenAI (optional)
- **Comprehensive Reporting** in HTML and JSON formats

Expand Down
2 changes: 1 addition & 1 deletion docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ features:

- icon: ⚡
title: High Performance
details: Built with TypeScript and Puppeteer for fast, reliable testing at scale
details: Built with TypeScript and Playwright for fast, reliable testing at scale

- icon: 🌐
title: Multi-Language
Expand Down
2 changes: 1 addition & 1 deletion docs/id/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Selamat datang di LensCore! Panduan ini akan membantu Anda memulai dengan platfo
LensCore adalah platform open-source yang menggabungkan:

- **Testing Aksesibilitas** dengan axe-core
- **Web Crawling Cerdas** menggunakan Puppeteer
- **Web Crawling Cerdas** menggunakan Playwright
- **Analisis Berbasis AI** dengan OpenAI (opsional)
- **Pelaporan Komprehensif** dalam format HTML dan JSON

Expand Down
2 changes: 1 addition & 1 deletion docs/id/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ features:

- icon: ⚡
title: Performa Tinggi
details: Dibangun dengan TypeScript dan Puppeteer untuk testing yang cepat dan reliable dalam skala besar
details: Dibangun dengan TypeScript dan Playwright untuk testing yang cepat dan reliable dalam skala besar

- icon: 🌐
title: Multi-Bahasa
Expand Down
2 changes: 1 addition & 1 deletion docs/public/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"networkidle0",
"networkidle2"
],
"description": "Puppeteer navigation wait condition",
"description": "Playwright navigation wait condition",
"example": "networkidle2"
}
},
Expand Down
Loading