A local application for querying and managing cost information from Autodesk Construction Cloud (ACC) API with automated reporting capabilities.
- 🔐 3-Legged OAuth Authentication - Secure authentication flow with persistent sessions
- 💰 Cost Data Queries - View budgets, contracts, cost items, and change orders
- 📊 Automated Reports - Schedule automatic cost data retrieval and reporting
- ⚛️ React + TypeScript UI - Modern, type-safe frontend interface
- 🔄 Real-time Updates - Webhook support for cost management events
- Frontend: React 18 + TypeScript + Vite
- Backend: Node.js + Express + TypeScript
- Database: SQLite (for token storage and scheduling)
- Authentication: 3-legged OAuth 2.0
- Scheduler: node-cron for automated reports
- Node.js >= 18.0.0
- npm >= 9.0.0
- Autodesk Platform Services Account
- Create an app at https://aps.autodesk.com/myapps
- Enable ACC API access
- Note your Client ID and Client Secret
npm run install:allCopy .env.example to .env and fill in your credentials:
cp .env.example .envEdit .env:
APS_CLIENT_ID=your_client_id_here
APS_CLIENT_SECRET=your_client_secret_here
APS_CALLBACK_URL=http://localhost:3000/api/auth/callback
SESSION_SECRET=generate_a_random_string
Development mode (runs both frontend and backend):
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
- Open the app in your browser
- Click "Login with Autodesk"
- Complete the OAuth flow
- Your tokens will be securely stored for automatic report generation
- Budgets: View all project budgets with detailed breakdowns
- Contracts: Access contract information and terms
- Cost Items: Query individual cost entries
- Change Orders: Track cost modifications
Configure automatic reports in the Settings panel:
- Set schedule using cron syntax
- Choose which cost data to include
- Reports are generated and saved automatically
GET /api/auth/login- Initiate OAuth flowGET /api/auth/callback- OAuth callback handlerGET /api/auth/status- Check authentication statusPOST /api/auth/logout- Clear session
GET /api/cost/budgets- List all budgetsGET /api/cost/budgets/:id- Get specific budgetGET /api/cost/contracts- List all contractsGET /api/cost/contracts/:id- Get specific contractGET /api/cost/items- List cost itemsGET /api/cost/change-orders- List change orders
GET /api/reports- List scheduled reportsPOST /api/reports- Create new report scheduleDELETE /api/reports/:id- Delete report scheduleGET /api/reports/:id/run- Manually trigger report
acc-cost-interface/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API client services
│ │ ├── types/ # TypeScript type definitions
│ │ ├── hooks/ # Custom React hooks
│ │ └── App.tsx # Main app component
│ └── package.json
├── server/ # Node.js backend
│ ├── src/
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic
│ │ ├── middleware/ # Express middleware
│ │ ├── models/ # Database models
│ │ └── index.ts # Server entry point
│ └── package.json
└── package.json # Root package.json
Frontend:
- React 18
- TypeScript
- Vite
- React Router
- Axios
- TailwindCSS (for styling)
Backend:
- Node.js
- Express
- TypeScript
- better-sqlite3 (database)
- node-cron (scheduling)
- express-session (session management)
- OAuth tokens are stored securely in SQLite database
- Session secrets should be strong random strings
- Never commit
.envfile to version control - The app should run on a secure server for production use
- Consider implementing token encryption at rest
MIT