# VoxPop Platform

VoxPop is a decentralized platform for crowdsourcing public opinion to inform legislation, empowering citizens to contribute directly to policy decisions.

## Project Structure

- **/frontend**: Next.js web application
- **/backend**: Go-based microservices
  - `/blockchain`: Polygon blockchain interaction service
  - `/identity`: User verification service
  - `/moderation`: Content moderation service
  - `/perspective`: User perspective management
  - `/feedback`: User feedback processing
  - `/cmd`: Main application entrypoints
- **/contracts**: Smart contracts for blockchain interactions
- **/analysis**: AI-driven analysis service
- **/docs**: Project documentation
- **/scripts**: Deployment and utility scripts

## Technologies

- **Frontend**: Next.js, TypeScript, Tailwind CSS
- **Backend**: Go, Gin web framework, GORM
- **Blockchain**: Polygon PoS (Amoy testnet for development)
- **Storage**: PostgreSQL, Redis, IPFS (planned)
- **AI Analysis**: Python-based NLP services

## Features

- Decentralized identity verification
- Submission of perspectives on policy issues
- AI-driven insight generation
- Community voting on insights
- Moderation system with AI filtering and human review
- Economic barriers for unverified users to prevent abuse
- Blockchain-based immutable record of all actions

## Getting Started

### Frontend

```bash
cd frontend
npm install
npm run dev
```

### Backend

```bash
cd backend
go mod download
cd cmd/api
go run main.go
```

Or using Docker:

```bash
cd backend
docker-compose up -d
```

### Analysis Service

```bash
cd analysis
docker-compose up -d
```

## Development Guidelines

- Follow Go coding conventions and Next.js best practices
- Write tests for all new features
- Document API endpoints and smart contract functions
- Maintain backward compatibility with existing data

## License

© 2024 Numenor Labs. All rights reserved.