Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,59 @@
api=https://group-manager-api.nutfes.net

d:
docker compose down

build:
docker compose build
docker compose run --rm user_front npm install
docker compose run --rm admin_view npm install
docker compose run --rm user npm install
docker compose run --rm api rails db:create
docker compose run --rm api rails db:migrate
docker compose run --rm api rails db:seed_fu FIXTURE_PATH=db/fixtures/develop

build-gm2:
docker compose build
docker compose run --rm user_front npm install
docker compose run --rm admin_view npm install
docker compose run --rm api rails db:create
docker compose run --rm api rails db:migrate
docker compose run --rm api rails db:seed_fu FIXTURE_PATH=db/fixtures/develop

build-gm3:
docker compose build
docker compose run --rm admin_view npm install
docker compose run --rm user npm install
docker compose run --rm api rails db:create
docker compose run --rm api rails db:migrate
docker compose run --rm api rails db:seed_fu FIXTURE_PATH=db/fixtures/develop

build-mac:
PLATFORM=arm64-darwin docker compose build
docker compose run --rm user_front npm install
docker compose run --rm admin_view npm install
docker compose run --rm user npm install
docker compose run --rm api rails db:create
docker compose run --rm api rails db:migrate
docker compose run --rm api rails db:seed_fu FIXTURE_PATH=db/fixtures/develop

build mac:
build-gm2-mac:
PLATFORM=arm64-darwin docker compose build
docker compose run --rm user_front npm install
docker compose run --rm admin_view npm install
docker compose run --rm api rails db:create
docker compose run --rm api rails db:migrate
docker compose run --rm api rails db:seed_fu FIXTURE_PATH=db/fixtures/develop

build db:
build-gm3-mac:
PLATFORM=arm64-darwin docker compose buildS
docker compose run --rm admin_view npm install
docker compose run --rm user npm install
docker compose run --rm api rails db:create
docker compose run --rm api rails db:migrate
docker compose run --rm api rails db:seed_fu FIXTURE_PATH=db/fixtures/develop

build-db:
docker compose run --rm api rails db:create
docker compose run --rm api rails db:migrate
docker compose run --rm api rails db:seed_fu FIXTURE_PATH=db/fixtures/develop
Expand Down
16 changes: 0 additions & 16 deletions admin_view/Dockerfile

This file was deleted.

18 changes: 13 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
version: '3'
services:
db:
image: mysql:8.0
container_name: 'GM2-DB'
container_name: 'GM3-DB'
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_ROOT_USER: root
Expand All @@ -17,15 +16,15 @@ services:
args:
PLATFORM: ${PLATFORM:-default}
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
container_name: 'GM2-API'
container_name: 'GM3-API'
volumes: [./api:/myapp]
ports: ["3000:3000"]
env_file: [webhook.env]
depends_on: [db]

admin_view:
build: ./admin_view
container_name: 'GM2-ADMIN-VIEW'
container_name: 'GM3-ADMIN-VIEW'
ports: ["8000:8000"]
command: npm run dev
volumes: [./admin_view:/app]
Expand All @@ -35,7 +34,7 @@ services:

user_front:
build: ./user_front
container_name: 'GM2-USER-FRONT'
container_name: 'GM3-USER-FRONT'
ports:
- "8002:8002"
- "24678:24678"
Expand All @@ -45,6 +44,15 @@ services:
- VUE_APP_URL=http://api:3000
- VUE_APP_API_URL=http://localhost:3000
depends_on: [api]

user:
build: ./user
container_name: 'GM3-USER'
ports:
- "8001:3000"
command: npm run dev
volumes: [./user:/app]
depends_on: [api]

volumes:
mysql-data:
Expand Down
3 changes: 3 additions & 0 deletions user/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
}
40 changes: 40 additions & 0 deletions user/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
40 changes: 40 additions & 0 deletions user/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/pages/api-reference/create-next-app).

## Getting Started

First, run the development server:

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

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) instead of React pages.

This project uses [`next/font`](https://nextjs.org/docs/pages/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

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

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn-pages-router) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/pages/building-your-application/deploying) for more details.
8 changes: 8 additions & 0 deletions user/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 = {
/* config options here */
reactStrictMode: true,
};

export default nextConfig;
26 changes: 26 additions & 0 deletions user/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"next": "15.0.3"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"eslint": "^8",
"eslint-config-next": "15.0.3"
}
}
8 changes: 8 additions & 0 deletions user/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
Binary file added user/public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions user/public/file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions user/public/globe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions user/public/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions user/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions user/public/window.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions user/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import "@/styles/globals.css";
import type { AppProps } from "next/app";

export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
}
13 changes: 13 additions & 0 deletions user/src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Html, Head, Main, NextScript } from "next/document";

export default function Document() {
return (
<Html lang="en">
<Head />
<body className="antialiased">
<Main />
<NextScript />
</body>
</Html>
);
}
13 changes: 13 additions & 0 deletions user/src/pages/api/hello.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from "next";

type Data = {
name: string;
};

export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>,
) {
res.status(200).json({ name: "John Doe" });
}
Binary file added user/src/pages/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file added user/src/pages/fonts/GeistVF.woff
Binary file not shown.
Loading