Files
explorer-monorepo/docs/STRUCTURE.md

86 lines
2.5 KiB
Markdown

# Monorepo Structure
> Historical note: this file still reflects the earlier static-SPA-oriented
> layout. The canonical live frontend is now the Next app in `frontend/src/`,
> deployed via `./scripts/deploy-next-frontend-to-vmid5000.sh`.
## Directory Overview
### `/frontend`
Frontend application code.
- **`public/`**: Compatibility/reference static assets
- `index.html`: Historical static explorer interface
- `explorer-spa.js`: Historical extracted SPA script
- **`src/`**: Canonical Next.js frontend source
- **`assets/`**: Images, fonts, and other static assets
### `/backend`
Backend services (if needed for future enhancements).
- **`api/`**: API service code
- Currently empty - explorer uses Blockscout API directly
### `/scripts`
Deployment and utility scripts.
- **`deploy-next-frontend-to-vmid5000.sh`**: Canonical frontend deploy
- **`deploy.sh`**: Deprecated static deploy shim
- **`test.sh`**: Test explorer functionality
### `/docs`
Documentation files.
- **`DEPLOYMENT.md`**: Deployment instructions
- **`STRUCTURE.md`**: This file
- Additional documentation as needed
### `/deployment`
Deployment configurations and templates.
### `/config`
Configuration files.
- **`deployment.json`**: Deployment settings for different environments
## File Organization
```
explorer-monorepo/
├── frontend/
│ ├── public/
│ │ └── index.html # Main explorer interface
│ ├── src/ # Source files (if using build tools)
│ └── assets/ # Static assets
├── backend/ # Backend services (future)
├── scripts/
│ ├── deploy.sh # Deployment script
│ └── test.sh # Testing script
├── docs/
│ ├── DEPLOYMENT.md # Deployment guide
│ └── STRUCTURE.md # This file
├── deployment/ # Deployment configs
├── config/
│ └── deployment.json # Environment configs
├── .gitignore # Git ignore rules
├── package.json # Root package.json
└── README.md # Main README
```
## Adding New Features
### Frontend Changes
1. Edit `frontend/src/` for the live frontend (current approach)
2. Or set up build tools in `frontend/src/` for compiled output
### Backend Changes
1. Add API services to `backend/api/`
2. Update deployment scripts if needed
### Documentation
1. Add docs to `docs/` directory
2. Update README.md as needed