PopenStatus is a full-stack application with a modern TypeScript/Vite frontend and a robust GO backend system.
-
Please visit here: https://popen-status.vercel.app/
-
To sign in, please use these credentials
Email: [email protected]
Password: test
Before you begin, ensure you have the following installed:
- npm (for package management)
- Go (v1.21 or higher)
- Node.js (v18 or higher)
- Git
PopenStatus/
├── ui/ # Frontend application
│ └── src/
│ ├── components/ # ShadcnUI-based components
│ ├── context/ # Org/WebSocket state
│ └── pages/ # Dashboard, PublicPage
├── backend/ # Backend services
│ ├── api/ # REST API (Go)
│ │ └── pkg/
│ │ ├── auth/ # Clerk JWT middleware
│ │ ├── models/ # GORM structs
│ │ ├── routes/ # REST/WebSocket handlers
│ │ └── ws/ # WebSocket server logic (WIP method-1)
│ ├── ws/ # WebSocket service (WIP method-2)
│ └── nginx/ # Nginx configuration (WIP)
-
Navigate to the frontend directory:
cd ui
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will be available at http://localhost:8080
-
Navigate to the API directory:
cd backend/api
-
Install Go dependencies:
go mod download
-
Build the API service:
go build -o api ./cmd/api
-
Run the API service:
./api # or for development go run ./cmd/api
The API service will be available at http://localhost:8000
Navigate to the WebSocket directory:
cd backend/ws
Follow the setup instructions in the WebSocket service's README file.
Navigate to the nginx directory:
cd backend/nginx
Copy the configuration files to your Nginx installation directory:
# For macOS sudo cp *.conf /usr/local/etc/nginx/servers/ # For Linux sudo cp *.conf /etc/nginx/sites-available/Test the Nginx configuration:
sudo nginx -tReload Nginx:
sudo nginx -s reload
- Frontend development server runs on port 8080
- API service runs on port 8000
Create .env
files in both frontend and backend/api directories as needed:
VITE_CLERK_PUBLISHABLE_KEY=`clerk_publishalbe_key`
VITE_API_URL=http://localhost:8000/api
CLERK_SECRET_KEY=`clerk_secret_key`
DATABASE_URL=`postgresql://username:[email protected]/dbname?sslmode=require`
CLERK_WEBHOOK_SIGNING_SECRET=`clerk_webhook_sigining_secret`
You can get a DATABASE_URL
from here
-
Navigate to the backend API directory:
cd backend/api
-
Run the migration and seed command:
go run cmd/seed/main.go
Note: Please make sure your DATABASE_URL
in the .env
file is correctly set before running migrations.
Now you can access this application of http://localhost:8080
.
If there's any question/doubt related to this project, please feel free to ping me @ [email protected].
Thank you for reading!