/nextjs-checkmate

A simple little chess game built in NextJS

Primary LanguageTypeScript

NextJS Checkmate

Chess game in the Next.js

Author: Gleyson Lira

Description: This source code was generated by @GleysonLF to experiment with the features of TypeScript, Next.js, React.js and Tailwind CSS by building a chess game.

Project Architecture

Folder structure for Next JS 14

  • Components - This is self-explanatory;
  • Config - Here is very simple, just store any config file;
  • Constants - Another useful folder to have to have all your constants in one place;
  • Context - Store your react context files;
  • DB - Store your database-related files;
  • Hooks - Store your custom react hooks;
  • Server actions - Next JS allows us to have functions that we can call from the client components that run on the server by using the 'use server' string on top of a function. A good to organize those functions is by creating a server-actions folder;
  • Models/Types - If you are using Typescript having a types folder is very useful for having your types easily accessible;
  • Vendor - Here you would store code that calls 3rd parties services.

That's it from me


Contribute to this project <3

Buy Me a Coffee at ko-fi.com