Skip to content

Currently a place to practice, clean architecture, golang and more

License

Notifications You must be signed in to change notification settings

ar-mokhtari/tel-note

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cgapp logo
Tel-Note

backend (Golang), frontend (JavaScript, Jquery)


go version  jQuery  javascript 

Tel-note is a structure and syntax practise with Go-lang.
This is an example of sending and receiving data from/to external sources and the operations of creating, reading, updating and maintaining data. Searching and creating sample reports is one of the project goals.

Special thanks to https://github.com/OmidHekayati ❤️ for training support

please notice me if you have any other idea ...

Gmail Telegram

Powered by


Requirements

Requirements for this project


  • Under Developing:

  • Identification, Authentication, Authorization to control user services(JWT)
  • Create Validation service
  • Export data to csv file
  • Send sms for different service(s)
  • Send email for different service(s)
  • Create and develop internal database to "data service(ing)"
  • Create reports, listen and export official data(s) by api(s) [b2e]
  • implement alert like (sweetAlert and nprogress) [b2e]
  • Call SepehrAPI for flight ticket attribute
  • Call GRS for hotel reservation
  • Call Safar724 bus ticket
  • Call varan CIP, airport services
  • Build with storage(s) type tags
  • Multi language service(s)
  • Create product wiki
  • Create UI web application
  • Create Mobile application (Android)

  • Developed :

  • Import data from external source csv file
  • Listen and export business data to applicant(s) [b2c]
  • use a web framework and router
  • create a collection for api(s) document(s)
  • Call Some Api(s) [b2b]
  • Insert and update country(ies) and its property(ies)
  • Send some data and receive processed data from provider, (lat and lng of a city and publish online traffic duration and distance[neshan.org])
  • Use general packages (lib)s

    To build:

$ go build -tags storageType(exmp: memory) -o bin/telnote

Create service

$ nano /lib/systemd/system/telnote.service

Set service

[Unit]
Description=telnote

[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=/home/aliz/go/src/tel-note/bin/telnote

[Install]
WantedBy=multi-user.target

Service's actions

$ service telnote start
$ service telnote restart
$ service telnote status
$ service telnote enable
$ service telnote stop

SDKs setting

  • UniversalTutorial(for get countries)
    Apply to get services from this site: universal-tutorial sdk/Universal/UniversalMetadata.go
  • Neshan(for get cities service(s))
    Apply to get services from this site: platform.neshan.org/api/ sdk/Universal/NeshanMetadata.go

Environment

  • IranCities.csv (for get cities)
    env/IranCities.csv
  • Sample data
    Create examples of all available entities for testing:
    • file: env/sampleData.go
    • service: services/sampleData/fillSampleData.go & getSampleData.go
    • cli: reg->data
    • route: 127.0.0.1:1212/fill-data and get-data

Entities

    Protocols:s
  • city
  • contact
  • country
  • customer
  • job
  • person
  • sex

Run application

  • cli->config->RunAppType = ""
  • cli->config->RunAppType = "serv"

Routes

  • city
    • 127.0.0.1:1212/get-city
    • 127.0.0.1:1212/add-city
    • 127.0.0.1:1212/edit-city
    • 127.0.0.1:1212/find-city-char
    • 127.0.0.1:1212/find-city-id
    • 127.0.0.1:1212/delete-city
    • 127.0.0.1:1212/distance-time-between-two-city
  • contact
    • 127.0.0.1:1212/get-contact
    • 127.0.0.1:1212/add-contact
    • 127.0.0.1:1212/edit-contact
    • 127.0.0.1:1212/find-contact-char
    • 127.0.0.1:1212/find-contact-id?id=2
    • 127.0.0.1:1212/delete-contact-id
    • 127.0.0.1:1212/delete-contact-all
  • country
    • 127.0.0.1:1212/country-list
  • customer
  • job
  • person
    • 127.0.0.1:1212/find-person-id?pid=2
  • sex

Json collection

To use and call from API platform like "Postman":
/docs/tel-note.postman_collection.json

User Interface [web]

Testing with "Nginx web server" [nginx install and setting](UI/Docs/nginx)

nginx 

or simply browse:

http://127.0.0.1:1212/index.html 

A sample SPA PWA with "Ajax" request which call routes ...

  • HTML
  • CSS Boostrap -v 5.1.3
  • jQuery 3.6.0
  • Ajax
/UI/tel-note.html 

Git

git 

for continue on existing repo:

cd existing_repo
git remote add origin `git address`
git branch -M main
git push -uf origin main

for production, there is stable main branch:

 git checkout main
 

for develop:

 git checkout -b developing
 

after all, back to main:

 git merge --no-ff developing
 

About

Currently a place to practice, clean architecture, golang and more

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published