Skip to content

mfikria/university-finder

Repository files navigation

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

Requirements

  • NodeJS >= v16.13.1
  • Yarn >=1.22.4

Features

  • User can search the universities and sort it by name or country
  • User can register in http://localhost:3000/auth/registration and login via http://localhost:3000/auth/signin
  • Registered user can add favorites universities. The list can be accessed in http://localhost:3000/favorites
  • User can subsribe using their email address

Tech Stacks

  • NextJS as main framework
  • Typescript as language
  • sequelize for database adapter
  • SQLite as database layer
  • husky and lint-staged
  • https://next-auth.js.org/ as auth provider

Local Setup

  • Copy the environements
cp .env.sample .env

Note: we use http://universities.hipolabs.com/search by default for the API. If somehow the API is down/can not be accessed please run https://github.com/Hipo/university-domains-list in local and change the NEXT_PUBLIC_UNIVERSITY_API_URL env variable.

  • Use Node LTS
nvm use
  • Install dependencies
yarn install
  • Migrate Database
npx sequelize-cli db:migrate

The SQLite is used by default. The DB file will be appeared in ./db/database_development.sqlite

  • Run the development server:
yarn dev

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

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Available Commands

  • yarn dev : Run development in local
  • yarn build : Build app
  • yarn start : Start app production mode
  • yarn lint : Lint the code
  • yarn test : Testing the code
  • yarn test --coverage : Testing the code with coverage

Available Routes

  • / : Home index
  • /auth/signin : Login page
  • /auth/registration : Registration page
  • /api/auth/signout : Logout page
  • /subscription : Subscription page
  • /favorites : Favorites page

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published