ResMon (Resource Monitor) is a comprehensive work time and resource tracking application built on the Simple Frontend Stack.
Powered by SolidJS π, TailwindCSS π¨ & DaisyUI πΌ for styling, with a rich ecosystem of libraries for managing time, projects, and resources.
Runs on Bun π and Vite β‘οΈ for an ultra-fast development workflow.
Check out the live app at ResMon.de
- Core Stack βοΈ
- Overview π
- What is ResMon? π°οΈπ
- Key Features β¨
- Quick Start Guide π
- Included Frameworks & Libraries π
- Vite Plugins π
- Development Workflow π οΈ
- Project Structure π
- CI/CD Pipeline π
- Deployment Options π
- Contributing π₯
- Summary π―
- License π
- Frontend: SolidJS π - React-like simplicity, unmatched performance
- Styling: TailwindCSS π¨ + DaisyUI πΌ - Utility-first beauty
- Backend: PocketBase ποΈ - Open source backend in a single file
- Bundler: Vite β‘ - Next generation frontend tooling
- Runtime: Bun π - All-in-one JavaScript runtime & toolkit
This project serves as a starting point for small, static web applications or extensions to existing projects. Whether you're adding just a tiny JavaScript snippet or building a full Single Page Application (SPA), this stack is designed to be as simple as possible while providing robust functionality.
The stack shines when used together with PocketBase β your "Open Source backend in 1 file" offering features such as:
- Realtime Database π
- Authentication π
- File Storage π
- Admin Dashboard π₯οΈ
With PocketBase, you can easily construct a full-stack application complete with user management, backups, job scheduling, and more. Alternatively, you can use this stack purely on the frontend.
The idea is to leverage standardized languages, libraries, tools, and frameworks to lower the entry barrierβeven for developers with limited IT background.
While languages like Elm or Gleam might offer superior type-safety for complex applications, PocketBase (written in Go) strikes a balance for a powerful yet simple backend solution.
Combined with TypeScript, SolidJS, and a vibrant ecosystem of libraries, you'll have a practical and maintainable environment for rapid development.
ResMon stands for Resource Monitor - a comprehensive tool for tracking your most valuable resources, especially time.
The genesis of ResMon occurred during a university project, highlighting the need for a straightforward work time tracking tool. For freelancers and those with side projects, having a simple way to measure time expenditure is invaluable.
ResMon aims to be more than just a time tracker:
- Project Management - Track time across different projects
- Task Organization - Break down projects into parts, sub-parts, and tasks
- Tagging System - Label tasks with categories like
Architecture
,Frontend
,Backend
- Notes and Ratings - Add context to tasks and rate satisfaction levels
- Tool Investment Tracking - Calculate ROI on tools you develop to streamline workflows
- Invoice Generation - Streamline client billing based on tracked time
- Administrative Cost Tracking - Account for indirect costs to be properly billed
- Expense Management - Record project-related expenses like travel or equipment
- Resource Analysis - Evaluate profitability of hardware and tool investments
- Work Pattern Insights - Review recent patterns, earnings, and rates
Don't squander your resources, especially the most precious one: time. Keep track of them with ResMon.
The application is designed to autonomously track your activities, expenses, and achievementsβprivately and transparently. By simplifying the tracking of your endeavors and finances, ResMon enables you to ascertain the value of your time and investments.
This project is in early development. The latest version is running at ResMon.de.
- Modern JavaScript/TypeScript Support - Full TypeScript integration with strict type checking
- Responsive Design Framework - Tailwind CSS with custom utility classes for responsive layouts
- Component Library - DaisyUI components with custom "solidarity" themes in light and dark modes
- Blazing Fast Development - Hot Module Reloading (HMR) with Vite and lightning-fast bundle times with Bun
- Advanced Animation Support - Built-in animations with Auto Animate, Swapy, and Intersection Observer utilities
- Accessibility - Accessible components using Kobalte UI primitives
- Icon System - Thousands of icons from multiple libraries via Iconify integration
- State Management - Multiple options from simple signals to XState for complex state machines
- Production Optimization - Built-in compression, code splitting, and performance optimizations
- Docker Support - Multi-architecture Docker images for easy deployment
- CI/CD Integration - GitHub Actions workflows for testing, building, and deployment
- Bun: This stack requires Bun for running and building the project.
- Go (optional): If you plan to use PocketBase as a backend, ensure Go is installed.
- Visual Studio Code: Recommended IDE. The project includes basic configurations and extension suggestions in the
.vscode
folder.
-
Clone the Repository π
git clone https://github.com/yerTools/simple-frontend-stack cd simple-frontend-stack
-
Install Dependencies π¦
Run the following to install all required packages with Bun:
bun install
-
Start Development π¬
Launch the development server with watch mode and live preview (default port 8161):
bun run dev
The app should now be available at http://localhost:8161.
-
Code Quality Tools π
- Prettier: Format code with:
bun run format
- ESLint: Check code for issues with:
bun run lint-check
- Prettier: Format code with:
-
Optional: CI/CD & Husky π€
Husky pre-push hooks ensure tests and linting run automatically. For more details, review the Husky configuration and GitHub CI/CD setup.
- SolidJS π - Core UI framework
- TailwindCSS π¨ - Utility-first CSS framework
- DaisyUI πΌ - Tailwind CSS component library
- Rombo Tailwind π« - Additional Tailwind utilities
- Swapy π - Animated component transitions
- Auto Animate β¨ - Animation library
- PocketBase ποΈ - Backend solution
- TailwindCSS Intersect π - Intersection utilities
- Nanostores ποΈ - Tiny state management
- Felte π - Form management
- Yup β - Schema validation
- Kobalte π‘ - Accessible UI components
- Lucide βοΈ - SVG icon library
- Solid Router π£οΈ - Routing solution
- Solid AG Grid π - Data grid component
- XState Store π - State machine management
- Unplugin Icons (Iconify) π - Icon integration
- Solid Markdown π - Markdown renderer
- Solid Highlight π - Code highlighting
Check out these useful Vite plugins included in the project:
- vite-plugin-webfont-dl π - Web font downloading
- vite-plugin-lqip πΈ - Low-quality image placeholders
- vite-plugin-solid β‘ - SolidJS integration
- vite-plugin-compression π¦ - Asset compression
- unplugin-lightningcss π©οΈ - CSS processing
This project includes several npm scripts to streamline your development workflow:
# Start production build with preview
bun run start
# Start development server with hot reloading
bun run dev
# Build for production
bun run build
# Preview production build
bun run serve
# Check for outdated dependencies
bun run update
# Update all dependencies
bun run upgrade
# Type checking with TypeScript
bun run type-check
# Format code with Prettier
bun run format
# Check code formatting
bun run format-check
# Lint and fix code issues
bun run lint
# Check for linting issues without fixing
bun run lint-check
# Backend-specific commands
bun run backend:build # Build the Go backend
bun run backend:serve # Run the PocketBase server
bun run backend:format # Format Go code
The project follows a simple and intuitive structure:
simple-frontend-stack/
βββ src/ # Source code
β βββ images/ # Image assets
β βββ pages/ # Page components
β βββ styles/ # CSS stylesheets
β β βββ general/ # General styling utilities
β βββ backend/ # Go backend code (PocketBase integration)
β βββ types/ # TypeScript type definitions
β βββ index.html # Main HTML template
β βββ index.tsx # Application entry point
βββ .github/ # GitHub-specific files
β βββ workflows/ # GitHub Actions CI/CD workflows
βββ .husky/ # Git hooks for code quality
βββ .vscode/ # VS Code configuration
βββ bun.lock # Bun lockfile
βββ Dockerfile # Docker container definition
βββ eslint.config.mjs # ESLint configuration
βββ go.mod, go.sum # Go module definitions
βββ main.go # Go entry point
βββ package.json # Project dependencies
βββ prettier.config.js # Prettier configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
This organization promotes separation of concerns and makes it easy to locate specific components and files within the project.
This project includes a comprehensive CI/CD workflow using GitHub Actions to automate testing, building, and deploying your application.
The CI/CD pipeline consists of these main jobs:
- Build Job - Builds and validates the application
- Deploy Pages - Deploys the frontend to GitHub Pages
- Deploy Docker - Builds and publishes multi-architecture Docker images
The workflow runs on:
- Push to main branch - Triggers full build and deployment
- Pull requests to main - Runs build and tests only
- Release tags - Triggered when you push a version tag (
v*.*.*
) - Manual trigger - Can be run on-demand from GitHub Actions tab
build:
runs-on: ubuntu-latest
steps:
# Setup and dependency installation steps
- name: Checkout Repository
- name: Setup Go
- name: Setup Bun
- name: Cache Bun Dependencies
- name: Install Frontend Dependencies
- name: Install Backend Dependencies
# Quality and security checks
- name: Security Scan Dependencies
- name: Run Type Check
- name: Run Format Check
- name: Run Tests
- name: Build Fullstack Application
- name: Run Lint Check
# Artifact creation for other jobs
- name: Upload Frontend Artifact
- name: Upload Go Binaries
This job sets up the environment, installs dependencies with caching for performance, runs various code quality checks, builds the application, and saves the build artifacts for use in subsequent jobs.
deploy-pages:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Download Frontend Artifact
- name: Copy index.html to 404.html for SPA fallback
- name: Setup Pages
- name: Upload artifact
- name: Deploy to GitHub Pages
This job deploys the frontend to GitHub Pages, but only when changes are pushed to the main branch. It also creates a 404.html page that redirects to the main application, enabling proper client-side routing for SPAs.
deploy-docker:
needs: build
name: Publish Docker Image
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Extract Version
- name: Log in to GitHub Packages
- name: Set up Docker Buildx
- name: Cache Docker layers
- name: Scan Docker image for vulnerabilities
- name: Build and push Docker image
This job builds and publishes multi-architecture Docker images to GitHub Packages. It runs on pushes to main or when version tags are created. The job also:
- Extracts version information from git tags
- Sets up Docker Buildx for multi-architecture builds
- Scans for security vulnerabilities with Trivy
- Caches Docker layers for faster builds
- Publishes images with proper version tagging
To use this workflow in your own project:
-
Set up GitHub repository secrets:
GH_PACKAGES_USERNAME
- GitHub username with package write permissionsGH_PACKAGES_PASSWORD
- GitHub personal access token with package write permissionsSNYK_TOKEN
(optional) - For dependency vulnerability scanning
-
Enable GitHub Pages:
- Go to your repository settings
- Navigate to Pages section
- Select "GitHub Actions" as the source
-
Configure Docker registry:
- Make sure your GitHub Container Registry is enabled
- Update the Docker image name in the workflow:
tags: | ghcr.io/YOUR_USERNAME/YOUR_REPO:${{ steps.version.outputs.TAG }} ghcr.io/YOUR_USERNAME/YOUR_REPO:latest
To create a versioned release with proper Docker image tagging:
# Tag a new version
git tag v1.0.0
# Push the tag to trigger the workflow
git push origin v1.0.0
This will create a Docker image tagged with both latest
and v1.0.0
.
You can customize the workflow by:
- Adding test coverage reporting
- Integrating with notification services (Slack, Discord, etc.)
- Setting up deployment to additional environments (staging, production)
- Adding performance testing or load testing
- Implementing canary deployments or blue-green deployment strategies
- Build failures: Check logs for specific error messages
- Deployment failures: Verify GitHub Pages is properly configured
- Docker push failures: Check credentials and repository permissions
- Security scan alerts: Review and fix identified vulnerabilities
The CI/CD workflow is designed to catch issues early in the development process and provide a smooth path to production deployment.
This project can be deployed in several ways:
For a purely static frontend deployment, build the project and deploy the generated files:
bun run frontend:build
Deploy the generated dist
folder to any static site hosting service like:
- GitHub Pages
- Netlify
- Vercel
- Cloudflare Pages
The project includes a robust, multi-stage Dockerfile for containerized deployment of both frontend and PocketBase backend:
# Build the Docker image
docker build -t simple-frontend-stack .
# Run the container
docker run -p 8161:8161 simple-frontend-stack
Pre-built Docker images are available from GitHub Container Registry with the following tags:
latest
- Built from themain
branchvX.Y.Z
- Built from release tags (e.g.,v1.0.0
)branch-name
- Built from branches (e.g.,branch-feature-xyz
)pr-123
- Built from pull requests (e.g.,pr-123
)
You can pull these images directly for testing:
# Pull latest stable version
docker pull ghcr.io/yertools/simple-frontend-stack:latest
# Pull specific version
docker pull ghcr.io/yertools/simple-frontend-stack:v1.0.0
# Pull from a branch
docker pull ghcr.io/yertools/simple-frontend-stack:branch-feature-xyz
# Pull from a pull request
docker pull ghcr.io/yertools/simple-frontend-stack:pr-123
The Docker implementation includes several production-ready features:
- Multi-stage build for minimal image size
- Non-root user for enhanced security
- Health checks for container orchestration platforms
- Volume mounts for data persistence:
docker run -p 8161:8161 \ -v ./pb_data:/app/pb_data \ -v ./pb_public:/app/pb_public \ -v ./pb_hooks:/app/pb_hooks \ -v ./pb_migrations:/app/pb_migrations \ simple-frontend-stack
- Environment variable support:
docker run -p 8161:8161 \ -e APP_ENV=production \ -e DEBUG=false \ simple-frontend-stack
- Multi-architecture support for various platforms:
docker buildx build --platform linux/amd64,linux/arm64 \ -t simple-frontend-stack . --push
Build both frontend and backend:
bun run build
Then deploy the generated binary and static files to your server.
The repository includes GitHub Actions workflows for:
- Building and testing the application
- Deploying to GitHub Pages
- Building and publishing multi-architecture Docker images
Contributions are welcome! Here's how you can contribute:
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/your-username/simple-frontend-stack cd simple-frontend-stack
- Create a new branch for your feature or bugfix:
git checkout -b my-feature-branch
- Make your changes and commit them with meaningful messages:
git commit -m "Add feature: description of your changes"
- Run tests and formatting checks:
bun run type-check bun run lint-check bun run format-check
- Push your branch to your fork:
git push origin my-feature-branch
- Submit a Pull Request through GitHub's interface.
- Participate in the review process by responding to feedback.
- Follow the established project structure
- Use TypeScript with strict types wherever possible
- Format your code with Prettier before submitting
- Ensure your code passes all ESLint checks
- Write meaningful commit messages following conventional commits style
- Add appropriate documentation for new features
This project offers a practical, no-nonsense frontend stack that gets you up and running with a modern development workflow quickly. The combination of Bun, Vite, and a carefully curated set of libraries provides the speed, simplicity, and flexibility needed for both small enhancements and complete web applications.
Happy coding! π
This project is licensed under the MIT License.
Code has no borders β neither should solidarity πβ
Last updated: March 27, 2025