A simple customer support tool for your projects built with Next.js. Check out a live demo.
To get Guidde up and running in your local environment:
- Clone the code locally:
git clone [email protected]:diegocouto/guidde.git
- Install all dependencies:
cd guidde && yarn install
- Run it in development mode:
yarn dev
Before you can start preparing to publish your new knowledge base, you might want to update and implement a few things:
- Set your own name, brand URL and social links on
/utils/constants/app.ts
- Make sure you have updated
.env.production
to match the URL of your knowledge base - You can easily update the primary color on
tailwind.config.js
You probably noticed that a Contact us button is available on Guidde's main navigation bar. Although the form itself is ready to use, you'll have to implement your own logic to submit this content in a way that makes sense for your current workflow.
In order to do so, update api/messages.ts
. Here you can see an example of how it would look like when using SendGrid to send your messages:
import Mail from '@sendgrid/mail';
import { NextApiRequest, NextApiResponse } from 'next';
Mail.setApiKey(process.env.SENDGRID_API_KEY);
export default (req: NextApiRequest, res: NextApiResponse) => {
if (req.body) {
const { email, subject, message } = JSON.parse(req.body);
const msg = {
to: '[email protected]',
from: '[email protected]',
replyTo: email,
subject: subject,
text: message,
};
if (process.env.SENDGRID_API_KEY) {
return Mail.send(msg)
.then(() => {
res.json({ success: true });
})
.catch((error) => {
console.error(error);
res.json({ success: false });
});
}
res.json({ success: false });
}
};
As a Next.js app, you have many options and different services where you can deploy your new knowledge base to. It's strongly recommended that you check Next.js's deployment documentation to choose what's the approach that makes more sense to you.