OpenAI Powered X (formerly Twitter) Community Notes "Equivalent" for Facebook
Note: Docs are not completed
Facebook Notes is an AI-powered community fact-checking system inspired by X's Community Notes. It allows users to collaboratively add context and fact-checking notes to Facebook posts.
- AI-powered fact verification
- Community-driven note creation and validation
- Integration with Facebook posts
- Authentication system for verified contributors
- Automated summary generation
- Go 1.19 or higher
- Facebook Developer Account
- OpenAI API key
- Clone the repository:
git clone https://github.com/mwelwankuta/facebook-notes.git
- Navigate to the project directory:
cd facebook-notes
- Install dependencies:
go mod tidy
- Log in with your Facebook Developer Account.
- Connect your OpenAI API key.
- Start adding and reviewing notes on Facebook posts.
API documentation is available via Swagger UI at /swagger/index.html
when running the server locally. You can also find the OpenAPI specification at /swagger/doc.json
.
FACEBOOK_APP_ID
: Your Facebook App ID.FACEBOOK_APP_SECRET
: Your Facebook App Secret.OPENAI_API_KEY
: Your OpenAI API key.DATABASE_URL
: URL for your database connection.
For detailed information on the authentication service, refer to the Authentication Service Documentation.
For detailed information on the summaries service, refer to the Summaries Service Documentation.
We welcome contributions! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by X's Community Notes
- Powered by OpenAI
All notable changes to this project will be documented in the CHANGELOG file.
For common questions and answers, please refer to the FAQ file.
The application requires the following environment variables to be set:
APP_ENV
: The application environment (e.g.,development
,production
).PORT
: The port on which the application will run (default:8080
).
SUMMARIES_SERVICE_URL
: The URL for the summaries service.SUMMARIES_SERVICE_API_KEY
: The API key used for accessing the summaries service.
DB_HOST
: The database host.DB_PORT
: The database port.DB_USER
: The database user.DB_PASSWORD
: The database password.DB_NAME
: The database name.
FACEBOOK_APP_ID
: The Facebook application ID.FACEBOOK_APP_SECRET
: The Facebook application secret.FACEBOOK_ACCESS_TOKEN
: The Facebook access token.
OPENAI_API_KEY
: The API key for accessing OpenAI services.
APP_ENV=development
PORT=8080
DB_HOST=localhost
DB_PORT=5432
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=your_db_name
FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret
FACEBOOK_ACCESS_TOKEN=your_facebook_access_token
OPENAI_API_KEY=your_openai_api_key
To run the authentication service, navigate to the auth
directory and execute:
cd internal/auth
go run main.go
To run the summaries service, navigate to the summaries
directory and execute:
cd internal/summaries
go run main.go
To run the main application, navigate to the project root directory and execute:
go run main.go
The project structure is organized as follows:
facebook-notes/
├── cmd/ # Main applications of the project
│ └── facebook-notes/ # The Facebook Notes application
├── internal/ # Private application and library code
│ ├── auth/ # Authentication service
│ ├── notes/ # Notes management service
│ ├── summaries/ # Summaries generation service
│ └── ... # Other internal packages
├── pkg/ # Public library code
│ └── ... # Shared packages
├── docs/ # Documentation files
├── .env.example # Example environment variables file
├── go.mod # Go module file
├── go.sum # Go dependencies file
└── main.go # Main application entry point
- Go 1.19 or higher
- Facebook Developer Account
- OpenAI API key
- PostgreSQL or any other SQL database
To run tests, use the following command:
go test ./...
You can deploy the application using Docker. Follow these steps:
- Build the Docker image:
docker build -t facebook-notes .
- Run the Docker container:
docker run -d -p 8080:8080 --env-file .env facebook-notes
If you encounter any issues or have questions, please open an issue on the GitHub repository.