The comprehensive Next.js starter and toolkit for building modern, scalable web apps with best practices, rapid setup, and a vibrant community.
Welcome to React Kolkata! This project provides a robust foundation for Next.js applications, featuring TypeScript, Tailwind CSS, i18n, testing, and more. Whether you're building a personal project or a production-grade app, React Kolkata helps you get started quickly and maintain code quality with ease.
Join our community events: React Kolkata on lu.ma
- Next.js 15+: Modern, server-rendered React apps
- TypeScript: Static typing for safer, scalable code
- Tailwind CSS: Utility-first, rapid UI development
- ESLint & Prettier: Code quality and consistent formatting
- Prettier Plugins: Tailwind class sorting & import sorting
- Husky: Pre-commit hooks for code quality
- Docker Support: Easy containerization and deployment
- Internationalization (i18n): Built-in multi-language support with next-intl
- Playwright & Vitest: E2E, unit, and integration testing
- Community Events: React Kolkata on lu.ma
npx create-next-app -e https://github.com/reactplay/react-kolkata.git my-app
cd my-apppnpm install # or npm install or yarn installpnpm dev # or npm run dev or yarn devVisit http://localhost:3000 to view your app.
To run the app in Docker:
docker-compose upBuilt-in support for multiple languages using next-intl.
- Route-based locale handling:
/[locale]/ - Easy translation hooks:
useTranslationsin server/client components - Translation files:
src/config/i18n/content/
Example:
import { useTranslations } from "next-intl";
const t = useTranslations("Home");
<h1>{t("welcomeMessage")}</h1>;Add a new language:
- Add a JSON file in
src/config/i18n/content/(e.g.,es.json) - Add the language code to the
localesarray insrc/config/i18n/navigation.ts
To add a new language, we have to add the language JSON file to the content directory, which is in the root directory, that is our first step.
After that, we have to add the newly added language to the locales array in the navigation.ts file. Below is the content of the navigation.ts file, where we need to add the newly added language to the locales array:
import {defineRouting} from 'next-intl/routing';
import {createNavigation} from 'next-intl/navigation';
export const routing = defineRouting({
// A list of all locales that are supported
locales: ['en', 'fr', 'newLanguage'], // Add the new language code here
// Used when no locale matches
defaultLocale: 'en'
});
export const {Link, redirect, usePathname, useRouter, getPathname} =
createNavigation(routing);To use strings from a language file in both client and server components, use the useTranslations hook.
-
Import
useTranslations:import { useTranslations } from "next-intl";
-
Initialize useTranslations with a section:
const t = useTranslations("Home");
-
Fetch and use translations:
<h1>{t("welcomeMessage")}</h1>
- Headless & UI browser testing (Chromium, Firefox, WebKit)
- Test location:
__test__/e2e/ - Config:
playwright.config.ts
Run tests:
pnpm test:e2e # or npm run test:e2e- Fast, parallel test runner with JSDOM
- Config:
vitest.config.mts
Run tests:
pnpm test # or npm run test.
βββ __test__ # All tests (e2e, unit, integration)
βββ public # Static assets (images, icons, etc.)
βββ src # Main source code
β βββ app # Next.js app directory
β βββ base # Base styles, constants, data
β βββ components # UI, common, custom components
β βββ config # i18n and other configs
β βββ lib # Utilities and shared logic
β βββ modules # Feature modules/sections
β βββ ... # More folders (see code)
βββ styles # Global and component styles
βββ types # TypeScript type definitionstest: All tests (e2e, unit, integration) public: Static assets (images, icons, etc.) src/components: UI, common, and custom components src/modules: Feature modules/sections src/config: Config files (i18n, etc.) src/base: Base styles, constants, and data src/lib: Shared utilities and logic styles: Global and component styles types: TypeScript type definitions
- Folders/files: kebab-case (e.g.,
my-folder) - Functions/variables: camelCase (e.g.,
filterProductsByType) - Constants: UPPERCASE (e.g.,
MAX_VALUE) - Component names: PascalCase (e.g.,
Footer) - Types:
.d.tsextension - Hooks: camelCase, start with
use(e.g.,useFetchData) - UI components: in
ui/folder, each as its own folder withindex.ts
Contributions are always welcome!
See CONTRIBUTING.md for ways to get started.
Please adhere to this project's CODE_OF_CONDUCT.md.
For more, join our React Kolkata lu.ma community!


