A full-stack application for analyzing and forecasting technology trends using patent data and market analysis.
tech-trends/
├── backend/ # Python Flask API for data processing and analysis
├── frontend/ # Next.js React application for visualization and reporting
└── README.md # This file
- Python 3.8+
- Node.js 18+
- pnpm (or npm/yarn)
Setup:
cd backend
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the Flask app
python app.pyThe backend will typically run on http://localhost:5000
Key Files:
- app.py - Main Flask application entry point
- db.py - Database models and connections
- scraping_raw_data.py - Patent data scraping functionality
- cleaners.py - Data cleaning and preprocessing utilities
- family_members.py - Patent family relationship management
Setup:
cd frontend
# Install dependencies
pnpm install
# Run development server
pnpm devThe frontend will typically run on http://localhost:3000
Structure:
- app/ - Next.js app directory with main pages
- forecasting/ - Technology forecasting visualizations
- reports/ - Report generation and viewing
- trend-analysis/ - Trend analysis dashboard
- components/ - Reusable React components
- lib/ - Utility functions and helpers
- Patent data analysis and search
- Technology trend forecasting
- Market size and strategy analysis
- Competitor analysis
- International patent search
- IP valuation statistics
- Geographic patent protection analysis
- Advanced search capabilities
Backend:
- Flask
- Python 3
- Data processing libraries
Frontend:
- Next.js 14
- React
- TypeScript
- Tailwind CSS
- Shadcn UI components
- Chart libraries for data visualization
- Use TypeScript in the frontend for type safety
- Follow PEP 8 guidelines in Python code
- Keep components modular and reusable
- Each folder has its own
.gitignorefile - Commit messages should be descriptive
- Create feature branches for new work
Create .env.local files in respective folders for local development:
Frontend (.env.local):
NEXT_PUBLIC_API_URL=http://localhost:5000Backend (.env):
FLASK_ENV=development
DATABASE_URL=your_database_url