Acorta URLs con Cloudflare Workers, TypeScript, HonoJS, Astro y Vue.js, con analíticas integradas y autenticación de usuarios con OAuth.
This project is divided into two main parts:
The project uses pnpm
as the package manager and a monorepo structure to manage both frontend and backend.
Install dependencies:
pnpm install
Run the frontend in development mode
pnpm frontend:dev
Starts the frontend development server.
Run the backend in development mode
pnpm backend:dev
Starts the backend development server (Cloudflare Worker).
Deploy the backend (Cloudflare Worker)
pnpm backend:deploy
Deploys the backend to Cloudflare Workers.
Deploy the frontend (production)
pnpm frontend:deploy
Builds and deploys the frontend for production.
To keep your sensitive data safe (like API keys), this project uses Wrangler secrets.
Add them via the terminal:
npx wrangler secret put YOUR_SECRET_NAME
Secrets are injected automatically at runtime and are not stored in the repository.
For a fully automated workflow, you can integrate with GitHub Actions and use Cloudflare API tokens as GitHub secrets:
- name: Deploy to Cloudflare
run: npx wrangler deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
This way, you keep your deploy process secure and automated!
Let me know if you want — I can also add optional sections like Project Structure, Contributing, or a badge/header design to make it even cleaner! 🚀