https://github.com/marco-souza/m3o
PocketBase Fullstack Framework
https://github.com/marco-souza/m3o
daisy-ui datastar golang pocketbase tailwindcss templ
Last synced: 2 months ago
JSON representation
PocketBase Fullstack Framework
- Host: GitHub
- URL: https://github.com/marco-souza/m3o
- Owner: marco-souza
- Created: 2022-09-12T20:01:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-07-29T23:09:40.000Z (11 months ago)
- Last Synced: 2025-07-30T01:00:08.490Z (11 months ago)
- Topics: daisy-ui, datastar, golang, pocketbase, tailwindcss, templ
- Language: templ
- Homepage: https://m3o.deno.dev
- Size: 15.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# m3o
[](https://golang.org/)
[](LICENSE)
[](https://pocketbase.io/)
This is a [PocketBase](https://pocketbase.io/) project called `m3o`.
## Features
- **PocketBase Backend**: A complete backend in a single file.
- **Custom `/hello` Endpoint**: A simple endpoint that returns "Hello world!".
- **Custom `hello` CLI Command**: A command that prints "Hello from CLI".
- **Cron Job**: A cron job that prints "Hello!" every 2 minutes.
- **Static File Serving**: Serves static files from the `pb_public` directory.
## Getting Started
### Prerequisites
- [Go](https://golang.org/doc/install)
- [Docker](https://docs.docker.com/get-docker/) (optional)
### Running with Go
1. **Clone the repository:**
```bash
git clone https://github.com/marco-souza/m3o.git
cd m3o
```
2. **Install dependencies:**
```bash
go mod tidy
```
3. **Run the application:**
```bash
go run main.go serve
```
### Running with Docker
1. **Build the Docker image:**
```bash
docker build -t m3o .
```
2. **Run the Docker container:**
```bash
docker run -p 8080:8080 m3o
```
## Usage
- **API Endpoint**: Access the `/hello` endpoint at `http://localhost:8080/hello`.
- **CLI Command**: Run the `hello` command with `go run main.go hello`.
## Stack
This project uses:
- **Go**: The primary programming language.
- **PocketBase**: As the backend framework.
- **Node.js**: For dependency management and running scripts.
- **Lefthook**: For git hooks management.
- **Prettier**: To format markdown files.
## Development
To contribute to this project, you need to have the following installed:
- [Go](https://golang.org/doc/install)
- [Node.js](https://nodejs.org/en/download/) (which includes `npx`)
To ensure code quality and consistency, this project uses [Lefthook](https://github.com/evilmartians/lefthook) to manage git hooks.
To get started, install our dependencies:
```bash
go install github.com/evilmartians/lefthook@latest
```
Then, install the git hooks:
```bash
lefthook install
```