diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1204282 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 42association + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index bd4db84..de49c91 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,36 @@ -# Go Web Application +# 42ActivityAPI -このプロジェクトは、Gin Webフレームワークを使用したGo言語によるWebアプリケーションです。認証フローを実装しており、ユーザーが42 APIを通じて自身のデータを取得できるようにします。 +This repository contains APIs written in Go language that are provided to a system aimed at streamlining 42Tokyo's operations and visualizing student contributions. -## 始め方 +## Overview +- Endpoints involved in school cleaning shift management. +- Endpoints involved in managing users. +- Endpoints involved in recording student contributions. +- Endpoints involved in managing NFC readers. -このプロジェクトを使用するには、以下の手順に従ってください。 - -### 必要条件 - -- Go言語がインストールされていること -- `git` がインストールされていること -- 42 APIへのアクセスと、クライアントID (`UID`) とクライアントシークレット (`SECRET`) を取得していること - -### インストール方法 - -1. リポジトリをクローンします。 - - ```bash - git clone https://github.com/your-username/your-project-name.git - cd your-project-name - ``` - -2. `.env` ファイルをプロジェクトのルートに作成し、以下の環境変数を設定します。 +## Getting started +This API requires Go, docker, and the 42API UID and secret. +1. Clone the repository. ``` - UID=your_42_api_client_id - SECRET=your_42_api_client_secret - CALLBACK_URL=your_callback_url + git clone https://github.com/42association/42ActivityAPI.git + cd 42ActivityAPI ``` -3. 依存関係をインストールします。 - - ```bash - go mod tidy +2. Write environment variables to `.env`. +3. Execute the API. ``` - -4. アプリケーションを実行します。 - - ```bash - go run . + make up ``` - これにより、デフォルトで `localhost:8080` にWebサーバーが立ち上がります。 - -## 使用方法 - -アプリケーションが実行されているときに、ブラウザを開き `http://localhost:8080` にアクセスしてください。ユーザー認証を行い、認証が成功すると、ユーザーの42 Intra名が表示されます。 - -## 機能 +## Usage -- `.env` ファイルからの環境変数の読み込み -- 42 APIを使用したOAuth認証 -- ユーザーデータの取得と表示 -- エラーハンドリング +[openapi.yml](./api/openapi/openapi.yml) -## 貢献 +## Contribution -プルリクエストはいつでも歓迎です。大きな変更を考えている場合は、まずissueを開いて話し合ってください。 +Pull requests are always welcome, but if you're thinking of making major changes, please open an issue first to discuss it. -## ライセンス +## LICENSE -[MIT](https://choosealicense.com/licenses/mit/) \ No newline at end of file +[MIT](./LICENSE) \ No newline at end of file