Skip to content
JamBalaya56562Public

About

Jam Balaya Blog🐶

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

1,928 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog

Biome Bun Next.js React Tailwind CSS TypeScript GitHub Codespaces License

JamBalaya56562's blog created by Next.js

📄 Get Started

To clone and run this application, you'll need Git and Mise installed on your computer.
From your command line:

1. Clone this repository

git clone https://github.com/JamBalaya56562/blog.git

2. Install dependencies with bun

cd blog && bun i

3. Set up the local database

This project uses DynamoDB for page view tracking. A container runtime is required — wslc is used when available, otherwise Docker. Set RUNTIME to force one.

# Start DynamoDB Local in the background and create the table
mise daemons start db

The db daemon is declared in [daemons] in mise.toml; mise hands the container to pitchfork and returns once the table exists. To watch the database's own log instead, run it in the foreground and stop it with Ctrl-C:

# Run DynamoDB Local (amazon/dynamodb-local) in the foreground
mise run db:start

The rest of the steps stand on their own:

# Create the DynamoDB table if it does not exist
mise run db:push

# Dump every page view row as JSON
mise run db:scan

# Stop DynamoDB Local container
mise run db:stop

The container runs -inMemory, so view counts reset when it stops.

The endpoint, region and table name come from [env] in mise.toml, so there is nothing to generate and nothing to copy from an example file. Override them for one machine in mise.local.toml, which is not committed.

No AWS access keys are needed. The local container accepts any signature, and on AWS the credentials come from the Lambda execution role.

4. Develop the app

Both daemons are declared in [daemons] in mise.toml; mise registers them with pitchfork, which runs them in the background:

# Start DynamoDB Local, then the dev server once the table is ready
mise daemons start dev

# Start DynamoDB Local on its own
mise daemons start db

# Watch the output, then stop both again
mise daemons logs -f dev
mise daemons stop dev db

The dev daemon depends on db, so it waits for the table rather than racing it. Stopping db stops the container. This is also the server the committed .claude/launch.json attaches the Claude Code browser preview to; it starts nothing of its own.

To run the dev server in the foreground instead, start the database first and then:

bun dev

Every page waits on the database, so bun dev against a stopped container stalls rather than fails.

5. Test the app

bun test:unit

6. E2E Test

mise e2e

mise e2e builds first, because Playwright serves the build with bun start, and brings DynamoDB Local up through the db daemon. A daemon that is already running is reused; a blog-dynamodb container started outside it — mise run db:start in another terminal — is replaced rather than reused, because db:start cannot tell a live container from one an interrupted run left behind. Run bun test:e2e directly when the build and the database are already up.

7. Format and Lint the files

bun lint:fix

8. Build the app

bun run build

9. Start the app

bun start

⚙️ Environment Variables

Development values live in [env] in mise.toml and are applied to anything run from this directory. On AWS they come from the Lambda function's own configuration instead — see lambda.tf.

Variable Description Default
DYNAMODB_TABLE_NAME DynamoDB table name. Unset disables view tracking blog-page-views
DYNAMODB_ENDPOINT DynamoDB endpoint override. Set for local development only -
AWS_REGION AWS region ap-northeast-1
CONTENT_SOURCE Content source ("local" or "github") "local"
GITHUB_OWNER GitHub repository owner -
GITHUB_REPO GitHub repository name -
GITHUB_BRANCH GitHub branch name "main"
GITHUB_CONTENT_PATH Root path for content in the repository "content"

🆚 VSCode

Visual Studio Code is the recommended IDE for working on this project, as it has been configured.

Once opening, you can run Extensions: Show Recommended Extensions to install the recommended extensions for good development is automatically configured.

🐳 Dev Containers

A dev container is a running container with a well-defined tool/runtime stack and its prerequisites.
You can try out dev containers with GitHub Codespaces or Visual Studio Code Dev Containers.

Setting up the dev container

GitHub Codespaces

GitHub Codespaces
GitHub Codespaces is a cloud-based development environment that allows you to work on this project directly in your browser.
You can click the badge above or here to get started.

Follow these steps to open this project in a Codespace:

  1. Click the Code drop-down menu.
  2. Click on the Codespaces tab.
  3. Click Create codespace on main.

For more info, check out the GitHub documentation.

VSCode Dev Containers

Follow these steps to open this project in a container using the VSCode Dev Containers extension:

  1. If this is your first time using a dev container, please ensure your system meets the pre-reqs (i.e. have Docker installed) in the getting started steps.

  2. To use this repository, open a locally cloned copy of the code:

    • Clone this repository to your local filesystem.
    • Press F1 and select the Dev Containers: Open Folder in Container... command.
    • Select the cloned copy of this folder, wait for the container to start, and try things out!

🫶 Contribute

Want to report a bug, contribute some code, or improve the documentation? Excellent!
Read up on our guidelines for contributing and Code of Conduct.
Then check out one of our issues labeled as 😵‍💫help wanted or good first issue.

♥️ Contributors

Contributors

📦 Credits

This software uses the following open source packages:

⚖️ License

The MIT License Copyright (c) 2023-2026 JamBalaya56562. Please have a look at the LICENSE for more details.

About

Jam Balaya Blog🐶

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages