A Feathers chat application
This project uses Feathers. An open source framework for building APIs and real-time applications.
-
Make sure you have NodeJS, yarn and postgresql installed.
-
Clone the repository to your local machine:
git clone https://github.com/Hackersgoddest/chat-app.git
-
Install your dependencies
cd feathers-chat yarn
-
Configure the environment variables:
- Create a
.env
file in theroot
directory and set your Feathers secret key and database connection details:PORT=3000 HOSTNAME=localhost DB_CONNECTION_STRING=postgres://username:password@localhost:5432/database-name FEATHERS_SECRET=secret-key
- Create a
-
Start your app
yarn compile # Compile TypeScript source yarn migrate # Run migrations to set up the database yarn dev
Working on this Feathers chat application provides valuable learning experiences across various aspects of web development and software engineering. Here are some key lessons you can learn:
- Dependency Management: Learn how to manage dependencies using Yarn.
- Environment Configuration: Understand the importance of environment variables for configuring your application securely and flexibly.
- API Development: Gain hands-on experience in building RESTful and real-time APIs using FeathersJS.
- Service Architecture: Learn how to structure your application with services, making it modular and easy to maintain.
- PostgreSQL Setup: Learn how to configure and connect to a PostgreSQL database.
- Migrations: Understand how to use database migrations to version and manage your database schema changes.
- TypeScript Compilation: Learn how to compile TypeScript code to JavaScript using a build process.
- Type Safety: Experience the benefits of using TypeScript for type safety and improved code quality.
- WebSockets: Understand how real-time communication is implemented using WebSockets, enabling features like live chat.
- Authentication: Implement user authentication, including sign-up and login functionalities, and learn how to manage user sessions securely.
Run yarn test
and all your tests in the test/
directory will be run.
This app comes with a powerful command line interface for Feathers. Here are a few things it can do:
$ npx feathers help # Show all commands
$ npx feathers generate service # Generate a new Service
For more information on all the things you can do with Feathers visit docs.feathersjs.com.
- Contributions to this project are welcome! If you have ideas for improvements or bug fixes, please submit an issue or a pull request.