This is a Next.js project bootstrapped with create-next-app.
- NodeJS
>= v16.13.1 - Yarn
>=1.22.4
- User can search the universities and sort it by name or country
- User can register in
http://localhost:3000/auth/registrationand login viahttp://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
NextJSas main frameworkTypescriptas languagesequelizefor database adapterSQLiteas database layerhuskyandlint-staged- https://next-auth.js.org/ as auth provider
- Copy the environements
cp .env.sample .envNote: 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:migrateThe SQLite is used by default. The DB file will be appeared in ./db/database_development.sqlite
- Run the development server:
yarn devOpen 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.
yarn dev: Run development in localyarn build: Build appyarn start: Start app production modeyarn lint: Lint the codeyarn test: Testing the codeyarn test --coverage: Testing the code with coverage
/: Home index/auth/signin: Login page/auth/registration: Registration page/api/auth/signout: Logout page/subscription: Subscription page/favorites: Favorites page
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.