Skip to content

Commit

Permalink
Add nextjs frontend (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte authored Jan 20, 2025
1 parent e415bf7 commit 3ec9467
Show file tree
Hide file tree
Showing 20 changed files with 6,396 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/front.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: front

on: push

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm clean-install
- run: npm run build
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml → .github/workflows/go.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: go

on: push

Expand Down
3 changes: 3 additions & 0 deletions front/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Websocket URL
# Reminder to replace this with production URL when building for production
NEXT_PUBLIC_WEBSOCKET_URL="ws://localhost:4000/list"
3 changes: 3 additions & 0 deletions front/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
}
41 changes: 41 additions & 0 deletions front/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# env files (can opt-in for commiting if needed)
.env*
!.env.example

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
35 changes: 35 additions & 0 deletions front/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Frontend for kimsufi-notfier

The website is hosted at: https://kimsufi-notifier.theobrigitte.com

## Getting Started

1. Copy `.env.example` to `.env` and fill in the required values.

2. Run the development server with:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

3. Open [http://localhost:3000](http://localhost:3000) with your browser.

4. Edit the file at `src/app/page.tsx`. The page auto-updates as you edit the file.

## Other commands

- `npm run build` to build the project into `build/` directory.
- `npm run lint` to run linter on the project.

## Links

This project uses Next.js and Tailwind CSS. Here are some helpful links:

- [Next.js](https://nextjs.org/docs)
- [Tailwind CSS](https://tailwindcss.com/docs)
8 changes: 8 additions & 0 deletions front/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
output: 'export',
distDir: 'build',
};

export default nextConfig;
Loading

0 comments on commit 3ec9467

Please sign in to comment.