GithubHelp home page GithubHelp logo

hanifrev / nextjs-redux-starter Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 114 KB

Next.js 14 + Typescript + Redux Toolkit + RTK Query + TailwindCSS starter kit / boilerplate

Home Page: https://nextjs-redux-starter-hanifrev.vercel.app/

JavaScript 1.43% TypeScript 96.31% CSS 2.26%
nextjs redux-toolkit rtk-query tailwindcss typescript

nextjs-redux-starter's Introduction

Next.js + Typescript + Redux Toolkit + RTK Query + TailwindCSS starter kit

The Next.js version is 14 and it using App Router. The documentation of this starter kit is on progress, and I will record a video to brief about this starter kit / boilerplate

Getting Started

Clone this template

There's two way to clone this template:

  1. Click the 'Use this template' button above or
  2. Use create-next-app
pnpm create next-app  -e https://github.com/hanifrev/nextjs-redux-starter

you can use yarn / npx too, it's up to you, but I recommend to using pnpm

Installation

pnpm install

.env files

Make sure you already create .env files on the root of the repo, you can use everything inside .env.example as starter

Running

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Folder Structure FAQ

I'm gonna explain some folder that might makes you confuse

common

The common directory houses generic and reusable components, types, and utilities that are shared across the application.

  • Components: This directory contains reusable UI components such as buttons, cards, modals, and other atoms or organisms. These components are often generic and can be used across different modules or features in your application. They are standalone and not tied to any specific functionality.

  • Types: Here, you store TypeScript type definitions/interfaces that are commonly used throughout your application. These types can include shared data structures, API response formats, or any other types that are used across multiple modules.

  • Utils: The utils directory typically holds utility functions or helper functions that are used in various parts of your application. These can include functions for data manipulation, formatting, validation, or any other common tasks. There's a 'fetcher' utils over there

modules

The modules directory organizes functionality, components, services, and types (all of which are optional) that are specific to different modules or features of your application. In your actual application, you may have multiple directories under the modules directory, each representing a specific module or feature. However, it's important to note that the components within each module directory are tailored to the functionality or UI of that particular module and may not be directly reusable in other modules.

lib

The lib folder centralizes your Redux state management setup, including the store, provider, feature-specific slices/reducers, and of course the services folder. The services folder focuses on API-related functionality, including RTK Query setup for data fetching and API service files for handling HTTP requests.

Learn More

To learn more about Next.js, take a look at the following resources:

nextjs-redux-starter's People

Contributors

hanifrev avatar

Stargazers

Olawunmi Salami avatar Mahmood Iftee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.