Skip to content

zarathucorp/open-powersamplesize

Repository files navigation

Open Power Samplesize

Deploy to GitHub Pages

TypeScript React Next.js Tailwind CSS shadcn/ui Recharts jStat ESLint Docker

Open Power Samplesize is a free, open-source web application designed to help researchers and students perform power and sample size calculations for various statistical tests. Our goal is to provide an intuitive and accessible tool for study design.

This tool supports a wide range of scenarios, including tests for means, proportions, time-to-event data, and more. This project is built with Next.js.

한글 README | 日本語 README

Introduction

Announcing the launch of Open Power Samplesize, a new tool designed to replace the now-discontinued powersandsamplesize.com.

For the many researchers who relied on powersandsamplesize.com, Open Power Samplesize restores the essential power and sample size calculation features. A key enhancement is the newly added support for non-inferiority testing.

The source code is fully open-source and available on the Zarathu GitHub.

For R users, all functions of Open Power Samplesize are available in the Rashnu package. The Rashnu package also offers advanced features, including sample size calculation for survival analysis using the log-rank test (with support for non-inferiority designs).

Getting Started

To run the development server in your local environment, follow these steps:

  1. Clone the repository.
  2. Install the dependencies:
    npm install
  3. Run the development server:
    npm run dev
  4. Open http://localhost:3000 in your browser to see the result.

Running with Docker

Alternatively, you can run the application using Docker:

  1. Build the Docker image:
    docker build -t open-powersamplesize .
  2. Run the Docker container:
    docker run -p 3000:3000 open-powersamplesize
  3. Open http://localhost:3000 in your browser to see the result.

Deployment

This project is automatically deployed to GitHub Pages whenever a push is made to the main branch. The deployment workflow is defined in .github/workflows/deploy.yml.

The site is currently available at: https://<your-github-username>.github.io/open-powersamplesize/

Using a Custom Domain

To use a custom domain for the deployed site, follow these steps:

  1. Configure GitHub Repository Settings:

    • Go to your repository's Settings > Pages.
    • In the "Custom domain" section, enter your purchased domain name (e.g., www.your-domain.com) and click Save.
  2. Configure DNS:

    • Go to your domain registrar's website (e.g., GoDaddy, Namecheap).
    • Create a CNAME or A record to point your domain to GitHub as instructed on the GitHub Pages settings page.
  3. Modify Next.js Configuration:

    • When using a custom domain, the basePath is no longer needed. Modify your next.config.ts file as follows:
    import type { NextConfig } from "next";
    
    const nextConfig: NextConfig = {
      output: "export",
    };
    
    export default nextConfig;
  4. Deploy Changes:

    • Commit and push the modified next.config.ts file to the main branch. GitHub Actions will automatically rebuild and deploy the site with the new settings.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages