Skip to content

VikeLabs/VikeEats

Repository files navigation

VikeEats

VikeEats is a web map application displaying all food outlets on the University of Victoria campus. This project was started under the University of Victoria Vikelabs Club to counteract the lack of a centralized information hub regarding the food options on campus: especially regarding dietary restrictions. It is built as a hybrid Next.js + Python app that uses Next.js as the frontend and Flask as the API backend.


Gallery

VikeEats front page 1

VikeEats front page 2

VikeEats GIF

How To Run

npm install

Then, run the development server:

npm run dev

If this doesn't work run

npm install -g pnpm

How It Works

The Python/Flask server is mapped into to Next.js app under /api/.

This is implemented using next.config.js rewrites to map any request to /api/:path* to the Flask API, which is hosted in the /api folder.

On localhost, the rewrite will be made to the 127.0.0.1:5328 port, which is where the Flask server is running.

In production, the Flask server is hosted as Python serverless functions on Vercel.

Demo

https://nextjs-flask-starter.vercel.app/

Deploy Your Own

You can clone & deploy it to Vercel with one click:

Deploy with Vercel

Developing Locally

You can clone & create this repo with the following command

npx create-next-app nextjs-flask --example "https://github.com/vercel/examples/tree/main/python/nextjs-flask"

Getting Started

First, install the dependencies:

npm install
# or
yarn
# or
pnpm install

Then, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

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

The Flask server will be running on http://127.0.0.1:5328 – feel free to change the port in package.json (you'll also need to update it in next.config.js).

Learn More

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

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published