Skip to content

akaparam/krawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Krawler URL Shortener

Monorepo with a serverless API and a React UI:

  • api/: AWS SAM + Lambda + DynamoDB backend
  • ui/: Vite + React + Tailwind frontend
  • docs/: API, architecture, deployment, and testing docs

Repository Layout

.
├── api/
│   ├── src/
│   ├── tests/
│   ├── template.yaml
│   ├── samconfig.toml
│   └── package.json
├── ui/
│   ├── src/
│   ├── .env.example
│   └── package.json
├── docs/
├── Makefile
└── README.md

Quickstart

  1. Install dependencies for both projects and create ui/.env:
make bootstrap
  1. Set backend URL for UI (if needed):
# ui/.env
KRAWLER_API_BASE_URL=http://127.0.0.1:3000
  1. Run both API + UI locally:
make dev
  • API: http://127.0.0.1:3000
  • UI: http://127.0.0.1:5173

Common Commands

make dev-api      # only SAM local API
make dev-ui       # only UI dev server
make test         # API unit tests
make test-e2e     # API E2E tests (requires E2E_BASE_URL)
make build        # API + UI build
make clean        # remove local build artifacts

E2E example:

E2E_BASE_URL="https://<api-domain>" make test-e2e

API Scope

Implemented backend endpoints:

  • POST /links
  • GET /{shortCode}
  • PATCH /links/{shortCode}
  • GET /links/{shortCode}
  • GET /links/{shortCode}/stats
  • GET /links/{shortCode}/stats/daily
  • DELETE /links/{shortCode}

Documentation

About

A SAM based URL shortener with password protection, link expirations, analytics dashboards and more...

Resources

Stars

Watchers

Forks

Contributors

Languages