https://github.com/anejckl/chatapp
https://github.com/anejckl/chatapp
ai angular javascript langchain
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anejckl/chatapp
- Owner: anejckl
- Created: 2024-09-29T17:09:29.000Z (almost 2 years ago)
- Default Branch: dev-anej
- Last Pushed: 2024-12-11T21:55:35.000Z (over 1 year ago)
- Last Synced: 2024-12-11T22:31:03.098Z (over 1 year ago)
- Topics: ai, angular, javascript, langchain
- Language: TypeScript
- Homepage:
- Size: 656 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ChatApp
This project is a chat application built with Angular and Node.js. It includes user authentication via Auth0, a chat interface, and various administrative functionalities.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
## Backend server
Run `npm run start-backend` to start the backend server. The backend server runs on `http://localhost:3000/`.
## Start both frontend and backend
Run `npm run start:all` to start both the frontend and backend servers concurrently.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
## Environment Variables
Create a `.env` file in the `api/` directory with the following content:
OpenAI
OPENAI_API_KEY=your-openai-api-key
MODEL_NAME=gpt-4
TEMPERATURE=0.7
Security
SECRET_KEY=your-secret-key
Cors
ORIGIN=http://localhost:4200
Database
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your-db-password
DB_NAME=chat_app
## API Endpoints
- `POST /api/user` - Save user details to session
- `POST /api/user/logout` - Logout user and destroy session
- `GET /api/chat` - Get chat messages
- `GET /api/chat/history` - Get chat history
- `GET /api/model` - Get model information
- `GET /api/terms` - Get terms and conditions
- `GET /api/admin` - Admin functionalities
## License
This project is open-source and available under the [MIT License](LICENSE).