This is a live coding session that I created for the Google Developer Student Club, Covenant University chapter in collaboration with Interswitch API. The purpose of this session is to teach beginners how to query an API and create payments using the Rest API, while also introducing them to monolithic architecture and good folder structure.
To get started with this project, you'll need to clone the repository:
git clone https://github.com/sayoadesokan/Google-Dev-Live-Coding-Interswitch-API.githttps://www.freecodecamp.org/news/introduction-to-git-and-github/
You'll need to have the following installed on your local machine:
- Node.js
- npm
https://nodejs.org/en/download
- To install the dependencies for this project, run the following command in the project directory:
npm installSetting up the .env file -- In the root directory of your project, locate the .env.example file. -- Rename the .env.example file to .env. -- Open the .env file in your editor of choice -- Fill in the required environment variables with their respective values.
To run the project on your local machine, run the following command:
- For the Development Environmnet run:
npm run dev- For Production Environment run:
npm run startThis will start the server and you can access the application at http://localhost:8080 or any other port specified in .env
This project uses the Interswitch API to create payments. To use the API, you'll need to sign up for an account on the Interswitch website and obtain an API key or simply use the demo test credentials using this link:
https://docs.interswitchgroup.com/docs/default-test-credentials
This project follows a monolithic architecture and has the following folder structure:
- The
configfolder contains configuration files for the application. - The
controllersfolder contains the controllers for the payment and user routes. - The
routesfolder contains the API routes for the payment and user data. - The
index.jsfile is the entry point for the application. - The
.envfile is an important configuration file for the application. It is used to store sensitive information such as API keys, database credentials, and other secrets.
If you'd like to contribute to this project, or make some improvements like connect it to the database and all
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Interswitch API for providing the API for this project
- Google Developer Community in Covenant University for hosting the live coding session
- Contributors to this project
Thank you for choosing to use this project to learn about querying an API, creating payments using the Rest API, and implementing good folder structure and monolithic architecture. If you have any questions or feedback, feel free to reach out to me. Happy coding!

