Skip to content

Installation

rocambille edited this page Nov 1, 2026 · 35 revisions

Summary: StartER is a pedagogical web application framework based on React / Express. Whether you are a beginner or an experienced developer, this guide will walk you through installing and configuring your first StartER application in a few minutes.

What you'll learn:

  • Set up a StartER application from the GitHub template
  • Configure environment variables for development
  • Run the development server and verify the installation

Overview

A web framework provides a structure and starting point for creating an application, allowing you to focus on completing a project.

Why StartER?

There are many tools and frameworks available for building a web application. However, we believe StartER is a good choice for prototyping modern, full-stack web applications while remaining a great learning tool.

If you're new to web development, this guide will help you get familiar with the ins and outs of the tool without feeling overwhelmed.

If you're at a more advanced stage, StartER will provide a solid foundation for deepening your knowledge and a playground for your own experiments.

StartER combines common packages in the JS ecosystem to provide a predictable environment. However, we welcome discussions and suggestions. Who knows, maybe you'll join the StartER development team?

Step-by-step installation

Requirements

Before creating your first StartER application, make sure you have:

  • Node.js version 22.22.2 or higher on 22.x, 24.15.0 or higher on 24.x, or 26 and above (required by node:sqlite and the project's dependencies; check your version with node -v).
  • Git installed on your local machine.
  • A GitHub account to clone or use the repository template.

Recommended background & mental models

StartER is deliberately designed with a "zero-magic" philosophy: there are no black-box ORMs, no hidden compilation steps, and no heavy client-side state managers. Because StartER keeps mechanisms transparent, you will get up to speed much faster if you are comfortable with:

  • Modern JavaScript & TypeScript: native ECMAScript Modules (import/export), Promises, async/await, and TypeScript interfaces/generics.
  • React fundamentals & the React 19 shift: components, JSX, and props (see React documentation). If you are used to "traditional React" (pre-React 19) setups, note that StartER does not fetch data inside useEffect: it uses React 19's native use() and <Suspense> boundaries.
  • HTTP & Web standards: standard HTTP methods (GET, POST, PUT, DELETE), common status codes (200, 201, 204, 206, 400, 401, 403, 404), headers, and cookies.
  • Basic SQL: tables, primary keys, foreign keys, and basic CRUD statements (SELECT, INSERT, UPDATE, DELETE). StartER does not use an ORM, so you will write explicit prepared SQL statements (database.prepare(...)) — see the SQLite tutorial if you need a refresher.

Tip

If any of these concepts are new to you, don't worry! StartER is designed as a learning tool. Each concept is explained in detail throughout this wiki (for example, see The Repository pattern for SQL data access and React components and hooks for data fetching).

Creating an application from the template

The StartER GitHub repository is a template repository. To use it:

  1. On GitHub, go to the StartER main page (https://github.com/rocambille/start-express-react).

  2. Above the file list, click Use this template and select Create a new repository.

  1. Use the Owner drop-down menu to select the account you want to assign the repository to.
  1. Enter a name for your repository and an optional description.
  1. Choose the repository's visibility. For more information, see About repositories.

  2. Click Create repository.

Cloning the application locally

Now you can clone your repository.

  1. On GitHub, navigate to your repository's main page.

  2. Above the file list, click <> Code.

  1. Copy the repository URL under "HTTPS", "SSH", or "GitHub CLI", depending on your preference.
  1. Open the terminal on your machine.

  2. Change the current working directory to the location where you want to clone your repository.

  3. Type git clone, then paste the URL you copied earlier.

    git clone git@github.com:YOUR-USERNAME/YOUR-REPOSITORY
  4. Press Enter to create your local clone.

    $ git clone git@github.com:YOUR-USERNAME/YOUR-REPOSITORY
    > Cloning into `YOUR-REPOSITORY`...
    > remote: Counting objects: 10, done.
    > remote: Compressing objects: 100% (8/8), done.
    > remote: Total 10 (delta 1), reused 10 (delta 1)
    > Unpacking objects: 100% (10/10), done.
  5. Change the current working directory to your local clone.

    cd YOUR-REPOSITORY

Now you can install the dependencies into your project's local node_modules directory.

npm install

You can also open the folder with your preferred code editor. For instance, you can use VSCode:

code .

Initial configuration

Depending on the application's runtime environment, you may find it useful to have different configuration values.

To achieve this, StartER uses a .env file to separate environment variables from the code. During a fresh installation of StartER, your application's root directory will contain a .env.sample file that defines the current environment variables. After installing StartER, copy this .env.sample file under the name .env.

cp .env.sample .env

Here are the required variables that you must fill in with your own values:

Variable Description
APP_BASE_URL Base URL of the application (used for magic links).
APP_SECRET Secret key used to sign authentication tokens (JWT). Treat it like a password: anyone who knows it can forge login sessions. Choose a long, random string.

Note

StartER uses a "Zero-Config" architecture with SQLite, so there is no need to configure a database server.

APP_PORT and SMTP_URL variables are available in the .env.sample file but are optional. They allow you to change the server port (5173 by default) and to configure an SMTP server (disabled by default).

Tip

To generate a random APP_SECRET, you can use the following command in your terminal:

openssl rand -hex 32

For a detailed description of each variable and advanced options, see the Directory structure page.

Start the application

Once the application is built and configured, generate your local database (database.sqlite file) from the provided default schema:

npm run database:reset

We recommend checking that the installation and configuration are correct before continuing:

npm run install:check

Then, launch the development server:

npm run dev

Once the server is started, your application will be accessible in your web browser at http://localhost:5173.

login page

Important

By default, the application requires authentication from the first launch. StartER uses Magic Link authentication instead of passwords. Here's how to log in during development:

  1. In the login form displayed on the page, enter any email address (e.g., jdoe@mail.com from the seeder data).

  2. Since no email server is configured yet, the login link will be printed in your terminal (the one running npm run dev). Look for a line like:

    Magic Link for jdoe@mail.com:
    http://localhost:5173/verify?token=abc123...
    
  3. Copy and paste this URL into your browser to complete the login.

You do not need Docker or any email setup for this to work.

home page

Tip

To test sending emails locally, you can use Mailpit with Docker (you must have Docker Engine installed on your machine). Configure the SMTP_URL variable in the .env file:

SMTP_URL=smtp://mailpit:1025

You can start your application with Mailpit using the command:

docker compose up --build

Best practices and use cases

  • Include non-sensitive variables in .env.sample so team members know what configuration is expected.
  • Never commit .env files to Git. Each machine requires its own values, and committing secrets directly to a repository exposes credentials.

See also

Now that you've created your StartER application, you might be wondering what you need to learn next. We strongly recommend checking out the following documentation:

Clone this wiki locally