[!CAUTION]
This boilerplate is still work in progress and expect any breaking changes will occured.
This is a mono repo that consist of frontend and backend with stack:
Use this repo as a template. You can also setup action-template-sync
to update template with already created repo (since it's different with repo forking).
Inside of your Astro project, you'll see the following folders and files:
/
āāā public/
āāā src/
ā āāā components/
ā ā āāā app/
ā ā āāā ui/
ā ā āāā InteractiveComponent.tsx
ā āāā layouts/
ā ā āāā BlogPage.astro
ā ā āāā DashboardPage.astro
ā ā āāā LandingPage.astro
ā āāā lib/
ā ā āāā utils.ts
ā āāā pages/
ā ā āāā index.astro
ā āāā services/backend/
ā ā āāā pocketbase.ts
ā ā āāā pocketbase-types.ts
ā āāā styles/
ā ā āāā global.css
ā āāā types/
ā āāā pages.ts
āāā .env
āāā package.json
Astro looks for .astro
or .md
files in the src/pages/
directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/
, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the public/
directory.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run CLI commands like astro add , astro check |
npm run astro -- --help |
Get help using the Astro CLI |
Go to backend
folder and copy .env.example
to .env
.
Using docker locally
docker build -t cheapstack/backend .
docker run --env-file .env --rm -p 8080:8080 cheapstack/backend