npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

nextjs-typescript-redux-starter

v1.3.0

Published

### ✨ Typescript 🌟 Redux-toolkit πŸͺ„ Eslint πŸͺ„ Prettier πŸ”₯ SWR βœ”οΈ Cypress βœ”οΈ React Testing library πŸš€ Zod πŸ’° DaisyUi 🎁 Docker πŸ‘€ Husky πŸ’€ Mongoose

Downloads

21

Readme

NextJs page router starter pack

✨ Typescript 🌟 Redux-toolkit πŸͺ„ Eslint πŸͺ„ Prettier πŸ”₯ SWR βœ”οΈ Cypress βœ”οΈ React Testing library πŸš€ Zod πŸ’° DaisyUi 🎁 Docker πŸ‘€ Husky πŸ’€ Mongoose

Table of Contents

Install starter package by npx

npx nextjs-typescript-redux-starter <project-name>

example:

npx nextjs-typescript-redux-starter my-next-project

Getting Started

Docker

Make sure you have installed Docker in your machine.
With docker you just have to run one command from your terminal to run project. docker-compose up --build

To persist data to database have to set environment variable in .env file. See .env.example

MongoDB local connection issue:

might cause issue:

mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.0.1

Replace 127.0.0.1 with mongo in URI.

correct:

mongodb://mongo:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.0.1
docker-compose up --build

Manuel setup

Before you can use Event Manager, you need to install its dependencies. Follow these steps:

  1. Clone this repository to your local machine.
git clone <repository-url>
cd event-manager

Installation

First, install dependencies and initial setup:

npm i or yarn

# then for setup pre-commit hook

npm run setup:husky 

#or 

yarn setup:husky

Run

Then, run the development server:

npm run dev
# or
yarn dev
# or

Database

Create a .env file in root directory. An example .env.example file added with key.

Add your mongoDB uri in env file.

Project is configured with Eslint config, prettier. If use Vscode editor, code will automatically show error on compile time and will format on save

Tools

  • SWR - Used for http request. SWR is a strategy to first return the data from cache (stale), then send the fetch request (revalidate), and finally come with the up-to-date data.
  • REDUX-TOOLKIT - State management
  • Redux-hook-form - Form control
  • ZOD - Zod is a TypeScript-first schema declaration and validation library.
  • React Icons
  • Date-fns - Date utility
  • DaisyUI - Tailwind Css component library for default styling and theming
  • React testing library - For unit and integration test
  • Typescript
  • Mongoose
  • Husky - a pre-commit hook to run test and lint before commit

Script

Test

To run test

npm run test

To clear jest cache

npm run test:clear

Prettify

To manully format code

npm run format

To check lint issue

npm run lint

Other

To find unused files or entrypoints

npm run find:unused

To analyze the bundle size

npm run analyze

#or
npm run analyze:server

#or
npm run analyze:browser

Show support

Give a ⭐️ if you like this project!