This backend project is a robust and scalable server-side application utilizing Node.js, Express, MongoDB, and Firebase. It is designed to handle various backend functionalities including user account management, image processing, and integration with OpenAI's GPT-4 API for text generation. Scheduled tasks for database updates are also implemented, ensuring up-to-date information on space events, astronauts, and spacecrafts.
- User Account Management: Create, read, update, delete, and manage user accounts, comments, and replies.
- Image Processing: Download and process images using Axios.
- OpenAI GPT-4 Integration: Generate and process text using OpenAI's GPT-4 model.
- Scheduled Database Updates: Automated updates to MongoDB collections with space events, astronaut details, and spacecraft information.
- Firebase Functions: Utilize Firebase for cloud functions and deployment.
- Space Development Information: Fetch and manage data related to space events, astronauts, and spacecrafts.
- Node.js (v18)
- MongoDB
- Firebase CLI
- TypeScript
- Clone the repository.
- Install dependencies:
npm install - Set up your Firebase project and configure the Firebase CLI.
- Configure your
.envfile with necessary environment variables (e.g., OPENAI_API_KEY).
- Development Mode:
npm run serve:dev - Production Mode:
npm run start
- User Accounts: CRUD operations, toggle articles and images, manage comments and replies.
- Image Processing: Endpoint for image download and processing.
- OpenAI Integration: Generate text using the OpenAI API.
- Space Devs Info: Fetch and manage data related to space events, astronauts, and spacecrafts.
The project includes scheduled functions to update the database with the latest space events, astronaut details, and spacecraft information using Firebase scheduled functions.
Deploy the functions to Firebase using: npm run deploy
Contributions to improve the project are welcome. Please follow the standard pull request process for your contributions.