waeeto (incomplete)
A questions and answer framework usable on your own site.
Projects Used
Setup
Users Table Setup
Note that user creation and updating is not part of this project. You as the administrator is to provide this. This is to
ensure that you can use any form of authentication you want eg. social auth (Facebook, google, twitter), passwords,
fingerprint, keys etc.
Create a users table with the following properties:
- it must also have fields
firstname
and surname
for easy recognition.
- it must also have field
email
for communications.
- It must also have field
timezone
for datetime values. Example value is 'Africa/Lagos'.
You must also provide a function that would get the currently logged in users. The function is given the request object
to get the cookies for its purpose. Set the waeeto.GetCurrentUser
to this function. The function has the following
declaration func(r *http.Request) (int64, error)
.
The waeeto.GetCurrentUser
should return 0 for public.
Begin
Get the framework through the following command go get -u github.com/bankole7782/waeeto
There is a sample application which details how to complete the setup. Take a look at it here
Copy the folder wa_files
from the main repo into the same path as your main.go
.
Make sure you look at main.go
in the sample app, copy and edit it to your own preferences.
Go to /waeeto-setup/
to create some tables that the project would need.
Then go to /waeeto/ask-question
to start using this project.
Files Setup
Read this for how to setup a service account
to use in communicating with google cloud storage.
You would need to create a bucket on google cloud storage for all your files in a waeeto installation. Then
set the name of the bucket to waeeto.BucketName
.
Email Setup
Please create a function with signature func (to, subject, msg string)
and set it to waeeto.SendMail
.
Theming Your Project
The sample project has no design. To make it beautiful make a template from this template :wa_files/bad-base.html
. Save it to your project and then point your version to waeeto.BaseTemplate
.
There is no navigation or footer. Please add them to your base template.
FAQs
When is X Database Support Coming
I don't intend to support more than one database so has to make the work cheaper.
When is X Cloud Support Comming
I don't intend to support more than one cloud.
License
Released with the MIT License