Skip to content

nonhana/apiplayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

321 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ApiPlayer Logo

ApiPlayer

An open-source, web-based API management platform. No downloads required โ€” just open your browser and start working.

Features โ€ข Tech Stack โ€ข Structure โ€ข Getting Started

English | ็ฎ€ไฝ“ไธญๆ–‡

Introduction

ApiPlayer is a web-based API management platform similar to ApiFox and Postman. It provides development teams with a lightweight and efficient API documentation and debugging experience โ€” no software installation or project configuration required, just open your browser and collaborate.

Features

API Management

  • Visual Editor โ€” Intuitive form-based API definition with full support for request parameters, body, and response structures
  • Group Management โ€” Tree-structured directories with drag-and-drop sorting and nested groups
  • Version Control โ€” Automatic version snapshots on every modification, with diff comparison and rollback support
  • Mock Data โ€” Auto-generate mock data based on JSON Schema

API Debugging

  • Online Runner โ€” Send HTTP requests directly in the browser, with backend proxy to bypass CORS restrictions
  • Environment Variables โ€” Multi-environment configuration (dev/test/prod) with one-click BaseURL switching
  • cURL Generation โ€” Auto-generate cURL commands from current configuration for easy sharing

Team Collaboration

  • Team Management โ€” Create teams, invite members, and assign roles
  • Project Isolation โ€” Independent member permissions and environment settings per project
  • RBAC Permissions โ€” Fine-grained access control with team/project dual-level hierarchy

Security

  • Cookie + Session โ€” Secure session management with multi-device login and session control
  • Context-aware Permissions โ€” Resource context-based permission validation to prevent privilege escalation

Tech Stack

Layer Technology
Frontend Vue 3 + TypeScript + Vite + Tailwind CSS + shadcn-vue
Backend NestJS + Fastify + Prisma + PostgreSQL + Redis
Deployment PM2 + Nginx + GitHub Actions CI/CD
Architecture pnpm Monorepo

Project Structure

apiplayer/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ frontend/          # Vue 3 frontend application
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ api/       # API request wrappers
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ components/# UI components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ composables/# Composable hooks
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ stores/    # Pinia state management
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ views/     # Page components
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ””โ”€โ”€ backend/           # NestJS backend service
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ”œโ”€โ”€ api/       # API module
โ”‚       โ”‚   โ”œโ”€โ”€ auth/      # Authentication module
โ”‚       โ”‚   โ”œโ”€โ”€ team/      # Team module
โ”‚       โ”‚   โ”œโ”€โ”€ project/   # Project module
โ”‚       โ”‚   โ””โ”€โ”€ ...
โ”‚       โ””โ”€โ”€ prisma/        # Database schema
โ”œโ”€โ”€ docs/                  # Documentation
โ””โ”€โ”€ .github/workflows/     # CI/CD configuration

Getting Started

Requirements

  • Node.js >= 20.x
  • pnpm >= 10.x
  • PostgreSQL >= 14
  • Redis >= 6

Local Development

# Clone the repository
git clone https://github.com/nonhana/apiplayer.git
cd apiplayer

# Install dependencies
pnpm install

# Configure backend environment variables
cp apps/backend/.env.example apps/backend/.env
# Edit .env file with your database credentials

# Initialize database
cd apps/backend
pnpm prisma:push
pnpm rbac:seed

# Start development servers
cd ../..
pnpm dev:backend   # Start backend (default port 3000)
pnpm dev:frontend  # Start frontend (default port 5173)

Production Build

pnpm build:frontend  # Build frontend
pnpm build:backend   # Build backend

Contributing

This project is under active development and some features are still being refined. Issues and Pull Requests are welcome!

License

MIT

Made with โค๏ธ by nonhana

About

Web API Manager, inspired by ApiFox, with NestJS & Vue3.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages