Throughout Spring and Fall 2024, our teams have been building Editor AI. We look forward to its continued development, ensuring that hyperlocal journalists are equipped with the tools they need to produce high-quality content efficiently and effectively.
Editor AI is a text editor designed to assist journalists with AI-driven suggestions, helping them enhance their writing, streamline editing, and improve content quality. It addresses the challenges faced by hyperlocal journalists, who often work with limited resources, by enabling them to produce content at the speed and scale of larger media outlets while adhering to professional standards, including AP style formatting. Control remains entirely with the editorial staff, as the AI offers helpful suggestions that can be accepted, modified, or ignored, integrating seamlessly into their workflow.
- Detect and correct grammar and spelling
- Edit stories to comply with the AP style
- Suggest and generate headlines
- Propose new content ideas and sources that could improve an article
- Suggest and generate copy for social media posts
- Frontend: Next.js, Tailwind CSS, TypeScript
- Backend: Flask (Python)
- Database: Firebase
- AI Development: Hugging Face
- Deployment: Vercel, Railway
- DevOps Tools: Git
Before you begin, ensure you have the following installed:
- Navigate to the frontend directory:
cd client/editor-ai/app
- Install dependencies:
npm install
- Start the development server:
Alternatively, you can use:
npm run dev
yarn dev pnpm dev bun dev
Refer to the Backend Getting Started Guide for detailed instructions on setting up and running the backend.
To build the frontend for deployment, run:
npm run build
- Install pytest:
pip install pytest
- Run backend unit tests:
pytest
- Navigate to the frontend test directory:
cd client/editor-ai
- Run tests with React Testing Library and Jest:
To run a specific test:
npm test
npm test __tests__/filename.test.js
se-editor-ai/
├── backend/
│ ├── chatbot/
│ ├── env/
│ ├── flask_app/
│ └── tests/
├── client/
│ └── editor-ai/
│ ├── .firebase/
│ ├── public/
│ ├── app/
│ │ ├── admin/
│ │ ├── api/
│ │ ├── components/
│ │ ├── context/
│ │ ├── firebase/
│ │ ├── pages/
│ │ └── styles/
└── README.md
backend/chatbot
: code for AI chatbot and suggestionsbackend/flask_app
: all application routesbackend/tests
: unit tests for backend codeclient/editor-ai/app/api
: API calls for document handling, AI suggestions, and social media copy generationclient/editor-ai/app/components
: reusable frontend componentsclient/editor-ai/app/context
: user authentication logicclient/editor-ai/app/firebase
: Firebase database connectionsclient/editor-ai/app/pages
: frontend code for page structuresclient/editor-ai/app/styles
: styling for the frontend
- Text Editor Page: Page reload redirect users to the login page even if logged in. Document content does not save after applying suggestions if the user does not interact with the text editor afterward.
- AI Features: Certain features behave inconsistently. This is most likely an issue with the prompting or response format.
- Promote Page: There is an issue preventing the deployment of promotions from the promote page. Running
npm run build
will display the page without errors, but not during deployment.
- Change AI Model
- Fix Existing Known Bugs and Issues
- Promote Page: Finish promote page user functionality, such as social media integration.
- Improve AI Features: Implement functionality to refresh AI-generated suggestions, headlines, etc. to receive new and different outputs.
- Migrate AI and API functionalities: Move AI functionalities and related API calls to the backend for security and performance (refer to image suggestions implementation).
- Migrate Authentication: Move Firebase authentication to the backend for security and performance.
- Google Authentication: Add Google login for easier user sign-in.
- Update UI Styling: Refresh login page, promote page, and profile page styling.
- Justin Wang - [email protected]
- Vittori Huang - [email protected]
- Songming Fan - [email protected]