Source code for the official website of AG Technology, a company specializing in automation and AI solutions for businesses. The site serves as a marketing tool, contact point, and content platform.
Overview • Key Features • Tech Stack • Setup & Installation • Contact
This project is the website for AG Technology. It includes:
- Frontend: A responsive static site built with HTML, CSS, and vanilla JavaScript.
- Backend: A Node.js server using the Firebase Admin SDK to connect to a Firestore database. The server is responsible for receiving and saving submissions from the contact form.
The site showcases the company's services, including an interactive savings calculator, and features a blog with professional articles.
- Responsive Company Website: Showcases company services, work process, and value proposition.
- Blog System: Articles are managed as JavaScript modules, allowing for easy content addition and management.
- Savings Calculator (ROI): An interactive tool for potential clients to estimate savings from automation.
- Contact Form: A functional form that sends data to the backend and stores it securely in Firestore.
- Cookie Consent Management: A banner for managing cookie consent according to regulations.
This project was built using the following technologies:
Frontend:
- HTML5
- CSS3
- JavaScript (ES6+)
Backend:
- Node.js
- Firebase Admin SDK
- Firestore (NoSQL Database)
To run this project locally, you will need Node.js and a Firebase project.
- Create a new project in the Firebase Console.
- In your new project, enable the Firestore Database.
- In your project settings (
Project settings->Service accounts), click "Generate new private key". This will download a JSON file. Save it for the next step.
-
Clone the repository
# Replace with your repository URL git clone https://github.com/sirmalev/ag-tech-website.git -
Navigate to the project directory
cd ag-tech-website -
Install dependencies
npm install
-
Set up environment variables a. Create a file named
.envin the project's root directory. b. Open the JSON file you downloaded from Firebase. c. Convert the entire content of the JSON file into a single Base64 encoded string. You can use an online tool or the following terminal command:# Replace 'path/to/your/serviceAccountKey.json' with the path to your file cat path/to/your/serviceAccountKey.json | base64
d. Add the resulting string to your
.envfile like this:FIREBASE_SERVICE_ACCOUNT_BASE64="<Your-Base64-String-Here>" -
Run the server (Assuming the server entry file is
src/app.jsor similar)node src/app.js
The server will run and listen for submissions from the form.
-
Run the frontend To view the site, you can use the Live Server extension in VS Code on the
public/index.htmlfile, or run a simple static server from your terminal:npx serve public