Skip to content

ljreaux/MeadTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MeadTools

MeadTools is an all-in-one mead, wine, and cider recipe-building calculator. It aims to have everything you need to build a recipe in one place, providing accurate estimates for volumes of fruit so you don't have to do a bunch of extra calculations.

Features

  • Recipe Builder: Create, save, and manage your recipes.
  • Extra Calculators: Various tools for calculations related to fermentation.
  • User Accounts: Save recipes, manage preferences, and more.
  • Public Recipe Sharing: Share recipes with other users.
  • iSpindel Integration: Connect iSpindel devices to track fermentation data.
  • API Access: API documentation is available at the /api route.

Installation

You can install MeadTools locally. Because the entire app is now built in Next.js 15 and uses React 18.

You also may want to remove i18nexus pull from the start scripts for local development. By default, i18nexus is included in the dev, build, and start scripts to sync translations from the external service. However, if you’re using the translations already included in the repository, you can remove it. To modify the scripts section, open the package.json at the root of the project and change the scripts to match the following.

"scripts": {
  "dev": "next dev",
  "build": "next build",
  "start": "next start",
  "lint": "next lint",
  "test": "jest --watch"
}

Prerequisites

  • Node.js (latest LTS recommended)
  • PostgreSQL (You will need to set up a local database to use MeadTools Locally)
  • npm

Setup

  1. Clone the repository:
git clone https://github.com/ljreaux/meadtools-nextjs-migration
cd meadtools
  1. Install dependencies
npm install
  1. Set up the environment variables by copying .env.example to .env and updating the values:
cp .env.example .env
  1. Start the development server:
npm run dev

Note that this will probably fail if you haven't completed the database setup already.

  1. Access the application at http://localhost:3000

Database Setup

To run MeadTools locally, you need a PostgreSQL database. Here are the steps to setup and seed the database.

  1. Install PostgreSQL Locally

    • Mac: brew install postgresql
    • Windows: Download and install from postgresql.org
    • Linux: sudo apt install postgresql
  2. Start PostgreSQL

    • Mac/Linux: pg_ctl -D /usr/local/var/postgres start
    • Windows: Start via pgAdmin or the Windows Services Manager
  3. Create a Database & User Open the PostgreSQL shell and run:

CREATE DATABASE meadtools;
CREATE USER meadtools_user WITH ENCRYPTED PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE meadtools TO meadtools_user;
  1. Update .env Add the database credentials:
DATABASE_URL=postgresql://meadtools_user:password@localhost:5432/meadtools
  1. Generate Prisma Client
npx prisma generate
  1. Run Migrations To apply the latest migrations and sync the schema, run:
npx prisma migrate dev --name init
  • If it’s the first time, this will create the prisma/migrations/ folder.
  • If migrations already exist, Prisma will apply them automatically.
  1. Check Database Tables To confirm the schema matches, you can inspect your database using:
npx prisma studio

This opens a GUI where you can inspect your tables and relationships.

  1. Seeding the database To fill your database with yeast, ingredient, and test users you can run:
npx prisma db seed

Tech Stack

  • Next.js 15
  • React 18
  • ShadCN Components
  • TypeScript
  • Supabase (or PostgreSQL for local development)
  • i18nexus for translation management

Contributing

MeadTools welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Push your branch and open a pull request.

Contribution Guidelines

  • Follow the existing code style (I use the default Prettier config to maintain consistency).
  • Ensure all new features are documented.
  • Test your changes before submitting a pull request.

German Only pages

  • Any .mdx files places in the germanOnlyPages folder will be automatically added as a page only accessible on the german locale /de.
  • The name of any page added in this folder will be the name of the route. This includes any nested folders, but be sure that the file name is set to what you want the route to be called.
    • example germanOnlyPages/welcome/example.mdx will be displayed at /de/welcome/example.
    • Note: Any files that with names that conflict with already existing routes will not overwrite existing routes.
  • .mdx files support standard GitHub-flavored Markdown with additional functionality for rendering React components. They will be displayed as HTML with styling consistent with the rest of the application.

License

This project is licensed under the MIT License.

Community & Support

Join our Discord server to discuss features, get support, and contribute to the project.


MeadTools is also live at meadtools.com.