Skip to content

This is a Next.js project bootstrapped with create-next-app.

Notifications You must be signed in to change notification settings

TakumiSenaha/grade-management

 
 

Repository files navigation

Grade Management

This is a Next.js project bootstrapped with create-next-app. It has been extended to support desktop deployment using NW.js.

Getting Started

Development Mode

To run the application in development mode:

yarn dev

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

You can edit the page by modifying files in the src directory. The application auto-updates as you edit the files.

Database Initialization

Before running the application, initialize the SQLite database:

yarn run setup-db

This will create the necessary database structure and populate initial data.

API

API routes are used for database interactions. The main API endpoint is accessible at:

This endpoint supports querying class data.

Desktop Deployment

This application has been converted into a desktop application using NW.js. Follow these steps to build and run the desktop version:

  1. Build the application:

    yarn run build
  2. Start the NW.js application:

    yarn start

    This will start both the local API server and the NW.js application.

NW.js Advantages

Using NW.js provides several benefits compared to other frameworks like Electron:

  • Integrated Web and Node.js Context: NW.js allows direct integration of Node.js modules within the browser context, enabling seamless communication between the frontend and backend.
  • Simplified Setup: NW.js requires less boilerplate compared to Electron, making it easier to set up and maintain.
  • Lightweight: Applications built with NW.js are generally smaller in size compared to Electron-based apps.
  • Native Windowing Support: NW.js leverages Chromium's native windowing system, ensuring consistent UI behavior across platforms.
  • Single Codebase: Existing web applications can be converted to desktop apps without major changes to the project structure.

Learn More

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

Deployment on Vercel

Although this application is optimized for desktop use, it can also be deployed as a web application. The easiest way to deploy is by using the Vercel Platform from the creators of Next.js.

Check out the Next.js deployment documentation for more details.

Commands Overview

Development and Setup

  • Install dependencies: yarn install
  • Initialize database: yarn run setup-db
  • Start development mode: yarn run dev

Build and Deploy

  • Build static files: yarn run build
  • Run the application: yarn start

SQLite Commands

  • List tables: .tables
  • View data: SELECT * FROM <table_name> LIMIT <n>;

Replace <table_name> with the name of your table and <n> with the number of rows to view.

About

This is a Next.js project bootstrapped with create-next-app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 69.9%
  • TypeScript 23.4%
  • CSS 6.7%