Admin Panel for mrinjamul.github.io
-
NodeJs (Required: 12+ ,Recommanded: 14 LTS)
-
Docker (Optional)
-
highlight.js (Imported buthNot Used)
For ENV,
# Golang ENV (.env)
GIN_MODE=release
PORT=<your port>
AUTH0_API_IDENTIFIER=<auth0 api identifier>
AUTH0_DOMAIN=<auth0 api domain>
# ReactJs ENV (ui/.env)
REACT_APP_API_URL=<your API server url>
REACT_APP_AUTH0_DOMAIN=<auth0 api domain>
REACT_APP_AUTH0_CLIENTID=<auth0 Application Client ID>
REACT_APP_AUTH0_AUDIENCE=<auth0 API Audience>
And Firebase admin sdk private key,
serviceAccountKey.json
Put serviceAccountKey.json in project's root directory.
Note: auth_config.json does not required. It's removed.
docker build -t mrinjamul-admin:latest .For server,
go mod download
go build -o main .For UI,
cd ui
npm install
touch .env # Write environment variables
npm run build
cp -rf build ../static
cd ..touch .env # Write environment variables
source .env
./maindocker run --rm -dp 3000:3000 --name myadmin mrinjamul-admin:latest| Methods | Endpoints | Description |
|---|---|---|
| GET | /api/ping | Use for ping |
| GET | /api/projects | fetch project informations |
| POST | /api/messages | send messeges to firestore |
| GET | /api/messages | fetch messeges from firestore (protected) |
| DELETE | /api/messages/:id | NEED TO IMPLEMENT (WIP) (delete a messege) (protected) |
| PUT | /api/messages | NEED TO IMPLEMENT (WIP) (mark as read) (protected) |
- Injamul Mohammad Mollah mrinjamul@gmail.com
- under MIT license