8000 GitHub - ibrothergang/fork-criteria-anyship-template: Template website repository for Criteria LLC - utilizing ShipAny boilerplate
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ibrothergang/fork-criteria-anyship-template

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

77 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Criteria Template

Modern Next.js template for Criteria projects.

preview

πŸ“‘ Table of Contents

πŸ“‹ Features

  • App Router - Next.js application with App Router architecture
  • TypeScript - Type-safe development with TypeScript
  • Tailwind CSS - Utility-first CSS framework
  • Shadcn UI - Accessible and customizable component library
  • Authentication - User authentication with next-auth
  • Internationalization - Multi-language support with next-intl
  • Payment Integration - Payment processing with Stripe
  • Dark Mode - Theme support with next-themes
  • Toast Notifications - User notifications with sonner
  • React Context - State management with React Context API

πŸš€ Getting Started

This repository is set up as a template that you can quickly use to start new projects.

Option 1: Use the Creation Script (Recommended)

# Using curl
curl -fsSL https://raw.githubusercontent.com/criteria/nextjs-template/main/create-criteria-app.sh | bash -s my-project

# Or clone and run
git clone https://github.com/criteria/nextjs-template.git
./nextjs-template/create-criteria-app.sh my-project

This script:

  • Creates a new project based on the template
  • Runs interactive setup with customization options
  • Optionally creates a GitHub repository
  • Automatically pushes to the created repository

Requirements: curl, jq, git, GitHub Personal Access Token (for repo creation)

Option 2: GitHub Template

  1. Click the "Use this template" button on GitHub

  2. Clone your new repository

  3. Run the setup script to customize your project:

    pnpm setup
    # or
    npm run setup

Option 3: Manual Clone

  1. Clone the repository

    git clone https://github.com/criteria/nextjs-template.git my-project
  2. Navigate to the project directory

    cd my-project
  3. Run the setup script

    pnpm setup
    # or
    npm run setup

Quick Start

  1. Install dependencies

    pnpm install
    # or
    make install
  2. Run the development server

    pnpm dev
    # or
    make dev

Quick Start with Makefile

The template includes a powerful Makefile that simplifies common development tasks:

  1. View all available commands:

    make help
  2. Development workflow:

    # Install dependencies
    make install
    
    # Start development server
    make dev
    
    # Build for production
    make build
    
    # Start production server
    make start
  3. Code quality:

    # Run all tests
    make test
    
    # Check TypeScript types
    make test-typescript
    
    # Run markdown tests
    make test-markdown
    
    # Lint code
    make lint
    
    # Fix markdown issues
    make lint-md-fix
  4. Maintenance:

    # Check for outdated dependencies
    make check-deps
    
    # Run security checks
    make security-check
    
    # Clean build artifacts
    make clean
  5. Deployment:

    # Deploy to Vercel
    make deploy-vercel
    
    # Deploy to Cloudflare
    make deploy-cf

πŸ”§ Development Workflow

Development Tools

This project includes a Makefile to simplify common development tasks. To see all available commands:

make help

Common Commands

  • Development:

    • make install - Install dependencies
    • make dev - Start development server
    • make build - Build the project
    • make start - Start production server
  • Code Quality:

    • make lint - Run linters (JavaScript/TypeScript)
    • make lint-md - Run markdown linter
    • make lint-md-fix - Fix markdown linting issues
  • Testing:

    • make test - Run all tests
    • make test-markdown - Run markdown tests
    • make test-typescript - Run TypeScript type checking
  • Maintenance:

    • make check-deps - Check for outdated dependencies
    • make security-check - Run security audit
    • make clean - Clean build artifacts
  • Deployment:

    • make deploy-vercel - Deploy to Vercel
    • make deploy-cf - Deploy to Cloudflare

πŸ§ͺ Testing & Quality Assurance

TypeScript Type Checking

Validate that your code follows TypeScript's type system correctly:

./tests/test-typescript.sh
# or
make test-typescript

Markdown Linting

This project uses markdownlint-cli2 to automatically fix common markdown linting issues. When you save a markdown file or commit changes, linting rules will be automatically applied.

  • To manually lint markdown files:

    pnpm lint:md
    # or
    make lint-md
  • To fix markdown issues:

    pnpm lint:md:fix
    # or
    make lint-md-fix

VS Code users with the markdownlint extension will see real-time linting feedback and can enable format-on-save.

Testing the markdown linting setup:

./tests/run-markdown-tests.sh
# or
make test-markdown

This verifies:

  • Detection of common markdown issues
  • Automatic fixing of fixable issues
  • Pre-commit hook functionality
  • VS Code format-on-save simulation

Dependency Management

Check for outdated dependencies:

./tests/check-dependencies.sh
# or
make check-deps

This helps ensure your project is using the most up-to-date and secure dependency versions.

Security Checks

Scan your dependencies for known security vulnerabilities:

./tests/security-check.sh
# or
make security-check

This runs an audit of your dependencies and reports any security issues found.

🚒 Deployment

Deploy to Vercel

The easiest way to deploy your Next.js app is with Vercel:

Deploy with Vercel

Or via command line:

make deploy-vercel

Deploy to Cloudflare

  1. Customize your environment variables

    cp .env.example .env.production
    cp wrangler.toml.example wrangler.toml
  2. Edit your environment variables in .env.production and put all the environment variables under [vars] in wrangler.toml

  3. Deploy

    make deploy-cf
    # or
    npm run cf:deploy

πŸ”’ Security Considerations

This template uses various third-party packages which may have security vulnerabilities in their dependencies. Regular security audits are recommended:

make security-check

Known security considerations:

  • Some development dependencies like vercel, wrangler, and @cloudflare/next-on-pages have transitive dependencies with vulnerabilities
  • These vulnerabilities are typical for development packages and don't affect the production build
  • Run pnpm update regularly to keep dependencies up to date

βš™οΈ Project Configuration & Customization

Environment Variables

Set up your environment variables:

cp .env.example .env.local

The template includes a comprehensive set of environment variables for:

  • Authentication (NextAuth)
  • Database connection (Supabase)
  • Payment processing (Stripe)
  • Analytics (Google Analytics, OpenPanel)
  • Storage (AWS S3)

Before deploying, make sure to properly configure these variables according to your project needs.

Theming

Customize your theme in app/theme.css

Use the shadcn-ui-theme-generator to create a custom theme.

Internationalization

  • Set your landing page content in i18n/pages/landing
  • Set your i18n messages in i18n/messages

πŸ“š Resources & Community

This template is based on ShipAny's Next.js boilerplate, which we've licensed for internal use at Criteria. The ShipAny documentation provides comprehensive guidance on many features included in this template, including:

  • Authentication setup
  • Payment integration
  • Internationalization
  • Database configuration
  • Deployment options
  • Component customization

We recommend referencing the ShipAny documentation alongside our template-specific documentation when building your projects.

πŸ“„ License

About

Template website repository for Criteria LLC - utilizing ShipAny boilerplate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.7%
  • Shell 4.3%
  • MDX 2.2%
  • JavaScript 1.3%
  • CSS 0.7%
  • Makefile 0.5%
  • Dockerfile 0.3%
0