Coder Social home page Coder Social logo

yubaneupane / go-real-estate-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prosper74/go-real-estate-app

0.0 0.0 0.0 1.24 MB

A full stack real estate app. Built with Go and NextJs

Shell 0.01% JavaScript 9.38% Go 16.74% TypeScript 70.72% CSS 3.14%

go-real-estate-app's Introduction

Real Estate App With Go and NextJS

This is a fullstack real estate app, built with Go version 1.19 and NextJs

safe_haven.mp4

This project is a simple real estate app project which aims to connect people with properties directly. It has some key features like;

  • Authentication
  • Agents create, update and delete their properties
  • Agents verification
  • admin dashboard (Coming Soon)
  • Create and manage properties
  • Showcase the properties
  • Notifification system

Database used

Postgres

Packages used

Go

Next JS

Note:

  • Create your own go mod file and delete the one used here, run the following command go mod init your-project-name
  • your-project-name is usually your github link and the name of your project, example "github.com/prosper74/go-project". This is not a must, but a recommendation.
  • Change the name of every import to your current go mod name. Example, open the main.go file, in the required imports section, replace these "github.com/atuprosper/go-project/pkg/config" to "github.com/atuprosper/your-project-name/pkg/config". Go through all files and make this replacement
  • After all the necessary changes, run the app go run cmd/web/*.go this will install all the third party packages and run the server on the selected port.
  • Create your postgres db
  • Setup the flags in main.go file - cmd/web/main.go
  • Setup the flags in run.sh file
  • Do not use the rub.bat file as it encounters errors sometimes from windows. run.sh will work for both windows and linux
  • Setup the .env file, rename the .env.example to .env. Create your sendinBlue account and add the api
  • In the .env file, the POSTGRES_URI is the hosted database, while the other database strings are for localhost. After setting either one up, make sure to check the main.go file
  • Setup the database.yml, rename the database.yml.example to database.yml. This will enable you to run soda migrate

Run the server

  • Manually: go run cmd/web/main.go cmd/web/middleware.go cmd/web/routes.go cmd/web/sendMail.go

  • Batch (Please use the linux method even on windows, as it works pretty well):
    On Windows - create a run.bat file in the root directory of the project and paste the below code

    go build -o out cmd/web/*.go
    ./out.exe
    

    Then run run.bat in the terminal

    On linux - create a run.sh file in the root directory of the project and paste the below code

    #!/bin/bash
    
    go build -o out cmd/web/*.go
    ./out <pass your flag dependencies here>
    

    Run chmod +x run.sh then run ./run.sh in the terminal

Soda migration

  • install soda, run go install github.com/gobuffalo/pop/v6/soda@latest
  • soda g config to generate a database.yml file in the current directory for a PostgreSQL database. Then setup your database
  • run soda generate fizz migration-name in the terminal, to create the migration folder and files. Run this code to create migration files for each table
  • We can also run sql version soda generate sql migration-name
  • The up file is used to create or update while the down file is used to delete or downgrade
  • run soda migrate to run the migration files
  • run soda migrate down to run the down migration files
  • run soda reset to drop everything in the database and create the migration again
  • Read the documentation to know more about Buffalo or the Fizz Github page

go-real-estate-app's People

Contributors

prosper74 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.