A simplistic todo list manager written in Go

Overview

Tasks

Tasks is a simplistic Go webapp to manage tasks, I built this tool to manage tasks which I wanted to do, there are many good kanban style boards, but I felt they were a bit too heavyweight for my taste. Also I wanted to learn the Go webapp development.

How to use?

Via script: bash install.sh

This will generate the binary and set up the database. If you want, you can copy the binary and the public folder into a folder of your choice.

Manually:

  1. go get github.com/thewhitetulip/Tasks
  2. change dir to the respective folder and create the db file: cat schema.sql | sqlite3 tasks.db
  3. run go build
  4. ./Tasks
  5. open localhost:8081

You can change the port in the config file

Features

  1. Add, update, delete task.
  2. Search tasks, the query is highlighted in the search results page.
  3. Github flavoured markdown, which enables us for using a task list, advanced syntax highlighting and much more.
  4. Supports file upload, randomizes the file name, stores the user given filename in a db and works on the randomized file name for security reasons.
  5. Priorities are assigned, High = 3, medium = 2 and low = 1, sorting is done on priority descending and created date ascending.
  6. Categories are supported, you can add tasks to different categories.
  7. Ability to hide a task from the timeline.
  8. For a task list, shows 6 out of 8 tasks completed.
  9. Single click install, just run the install.sh file.
Book

I am learning writing webapps with Go as I build this application, I took to writing an introductory book about building webapps in Go because I faced a lot of problems while learning how to write webapps in Go, it, the book strives to teach by practical examples. You are welcome to contribute to the book.

Screenshots

The Home Page

Home Page

Add Task dialog

Add Task

Navigation drawer

Navigation Drawer

License

The MIT License (MIT)

Copyright (c) 2015 Suraj Patil

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Downloading attached file it is not named correctly

    Downloading attached file it is not named correctly

    When downloading a file attached to a task, it is named with it's md5 hash. Furthermore the extension is missing. Once I add the extension the file can be opened as expected.

    When downloading a file attached to a task the downloaded file should be named as the original file including it's file extension.

    I tested this in the current version using Chrome and Firefox.

    On a side note: It would be nice to be able to upload a new revision of a file to an existing task.

    hacktoberfest 
    opened by ChristianAE 12
  • database Close function  doesnt use

    database Close function doesnt use

    Hi @thewhitetulip ,i saw you defined the Close funtion to close the databse connection, but i didnt see you use this function ,why not close the database connection?

    opened by glepnir 9
  • Can't build it

    Can't build it

    Hi i tried to run the instruction but when I ran go get and tired to build it I got this:

    Users/noby > go get github.com/thewhitetulip/Tasks github.com/thewhitetulip/Tasks/views Golang/src/github.com/thewhitetulip/Tasks/views/api.go:31: invalid operation: token.Claims["username"](type jwt.Claims does not support indexing) Golang/src/github.com/thewhitetulip/Tasks/views/api.go:32: invalid operation: token.Claims["exp"](type jwt.Claims does not support indexing) Golang/src/github.com/thewhitetulip/Tasks/views/api.go:54: invalid operation: token.Claims["username"](type jwt.Claims does not support indexing)

    /Users/noby/Golang/src/github.com/thewhitetulip/Tasks > ls README.md config.json files public screenshots templates utils config db main.go schema.sql sessions types views

    /Users/noby/Golang/src/github.com/thewhitetulip/Tasks > cat schema.sql | sqlite3 tasks.db /Users/noby/Golang/src/github.com/thewhitetulip/Tasks > ls

    README.md config.json files public screenshots tasks.db types views config db main.go schema.sql sessions templates utils

    /Users/noby/Golang/src/github.com/thewhitetulip/Tasks > go build github.com/thewhitetulip/Tasks/views views/api.go:31: invalid operation: token.Claims["username"](type jwt.Claims does not support indexing) views/api.go:32: invalid operation: token.Claims["exp"](type jwt.Claims does not support indexing) views/api.go:54: invalid operation: token.Claims["username"](type jwt.Claims does not support indexing)

    opened by ghost 6
  • Build instructions don't work

    Build instructions don't work

    The build instructions in README.md don't work:

    How you install?
    ==================
    
    1. `go get github.com/thewhitetulip/Tasks`
    1. change dir to the respective folder and create the db file: `cat schema.sql | sqlite3 tasks.db`
    1. run `go build`
    1. ./Task
    1. open [localhost:8080](http://localhost:8080)
    

    go build gives an error

    main.go:9:2: cannot find package "github.com/thewhitetulip/Tasks/views" in any of: /usr/local/go/src/github.com/thewhitetulip/Tasks/views (from $GOROOT) /home/ben/projects/golib/src/github.com/thewhitetulip/Tasks/views (from $GOPATH)

    I found that this worked:

    $ go get github.com/thewhitetulip/Tasks/views $ go build

    opened by benkasminbullock 5
  • Hi  Cant loginin

    Hi Cant loginin

    i got these log.

    2019/04/01 12:20:52 running server on  :8081
    2019/04/01 12:20:59 error identifying session
    2019/04/01 12:20:59 error identifying session
    2019/04/01 12:21:25 taiga taiga [email protected]
    2019/04/01 12:21:25 inside task query
    2019/04/01 12:21:25 Commit successful
    2019/04/01 12:21:25 error identifying session
    2019/04/01 12:21:26 error identifying session
    2019/04/01 12:21:30 error identifying session
    2019/04/01 12:21:30 error identifying session
    2019/04/01 12:21:38 error identifying session
    2019/04/01 12:21:38 error identifying session
    2019/04/01 12:21:53 error identifying session
    2019/04/01 12:21:53 error identifying session
    
    opened by glepnir 4
  •  Tasks/db/tasks.go  runtime error after try to login with new user

    Tasks/db/tasks.go runtime error after try to login with new user

    Hi after i tried to login with an new user i got an runtime error.

    I'm not an SQL expert but it seems there is a column missing.

    Here is the output:

    016/08/30 15:08:22 getting tasks for pending 2016/08/30 15:08:22 no such column: t.hide 2016/08/30 15:08:22 http: panic serving 192.168.1.2:51734: runtime error: invalid memory address or nil pointer dereference goroutine 50 [running]:

    It must be in this file: Tasks/db/tasks.go

    And these are the columns of the table task in task.db

    sql-snapshot

    What I'm doing wrong and what does the column t.hide exactly do?

    opened by ghost 4
  • Fix error occurring when attaching a file to a Task

    Fix error occurring when attaching a file to a Task

    https://github.com/thewhitetulip/Tasks/issues/18 Extend the SQL storing the information to a file by username and creation date.

    The SQL storing the information about an attached file was missing the values for the user_id and creation_date.

    This pull request extends the SQL by these two values.

    opened by ChristianAE 4
  • issue when change html, js, css

    issue when change html, js, css

    When I change html, js, css I need turn off server and reload server then new code appear. Why the server didn't auto receive new client code, sorry for my bad english

    opened by PhanHaHus 3
  • Error when attaching file to task

    Error when attaching file to task

    I get the following error when trying to attach a file to a task:

    2016/05/15 21:53:27 inside task query
    2016/05/15 21:53:27 table files has 4 columns but 2 values were supplied
    2016/05/15 21:53:27 http: panic serving [::1]:60501: runtime error: invalid memory address or nil pointer dereference
    goroutine 90 [running]:
    net/http.(*conn).serve.func1(0xc820366e80)
        /usr/local/go/src/net/http/server.go:1389 +0xc1
    panic(0x45e2ec0, 0xc82000a0d0)
        /usr/local/go/src/runtime/panic.go:426 +0x4e9
    database/sql.(*Tx).Stmt(0xc820454ff0, 0x0, 0x1d)
        /usr/local/go/src/database/sql/sql.go:1341 +0x32
    github.com/thewhitetulip/Tasks/db.taskQuery(0x46ef900, 0x1d, 0xc8204d3690, 0x2, 0x2, 0x0, 0x0)
        /Users/christian/Development/Go/src/github.com/thewhitetulip/Tasks/db/tasks.go:254 +0x172
    github.com/thewhitetulip/Tasks/db.AddFile(0xc8204c8720, 0x26, 0xc820322fe0, 0x20, 0x0, 0x0)
        /Users/christian/Development/Go/src/github.com/thewhitetulip/Tasks/db/files.go:15 +0x187
    github.com/thewhitetulip/Tasks/views.AddTaskFunc(0x5a5ce20, 0xc82045eea0, 0xc820508b60)
        /Users/christian/Development/Go/src/github.com/thewhitetulip/Tasks/views/addViews.go:98 +0xe9e
    github.com/thewhitetulip/Tasks/views.RequiresLogin.func1(0x5a5ce20, 0xc82045eea0, 0xc820508b60)
        /Users/christian/Development/Go/src/github.com/thewhitetulip/Tasks/views/sessionViews.go:18 +0x95
    net/http.HandlerFunc.ServeHTTP(0xc820210720, 0x5a5ce20, 0xc82045eea0, 0xc820508b60)
        /usr/local/go/src/net/http/server.go:1618 +0x3a
    net/http.(*ServeMux).ServeHTTP(0xc820062a80, 0x5a5ce20, 0xc82045eea0, 0xc820508b60)
        /usr/local/go/src/net/http/server.go:1910 +0x17d
    net/http.serverHandler.ServeHTTP(0xc820232400, 0x5a5ce20, 0xc82045eea0, 0xc820508b60)
        /usr/local/go/src/net/http/server.go:2081 +0x19e
    net/http.(*conn).serve(0xc820366e80)
        /usr/local/go/src/net/http/server.go:1472 +0xf2e
    created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2137 +0x44e
    

    A copy of the file is placed in the files folder.

    This line of code seem to build the SQL to write to the database: err := taskQuery("insert into files values(?,?)", fileName, token). The error reads table files has 4 columns but 2 values were supplied. Since the SQL provides only two values this seems to be the issue.

    I created a pullrequest fixing this issue: https://github.com/thewhitetulip/Tasks/pull/19

    opened by ChristianAE 2
  • Added new tests to addView_test.go

    Added new tests to addView_test.go

    These are edge cases. The basic flow will be a ted bit harder since they need a database mock, or an interface instead of the database to use as a Test database.

    opened by Skarlso 2
  • Added a file handler test which tests the first handler in addViews.

    Added a file handler test which tests the first handler in addViews.

    To check what areas are covered, run the following commands:

    go test -coverprofile=cover.out
    go tool cover -html=cover.out
    

    This will give you a nice view of what functions are covered and what not.

    opened by Skarlso 2
  • Add SECURITY.md

    Add SECURITY.md

    Hello 👋

    I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@an5er) has found a potential issue, which I would be eager to share with you.

    Could you add a SECURITY.md file with an e-mail address for me to send further details to? GitHub recommends a security policy to ensure issues are responsibly disclosed, and it would help direct researchers in the future.

    Looking forward to hearing from you 👍

    (cc @huntr-helper)

    opened by benharvie 0
  • Editing tasks always displays first entry

    Editing tasks always displays first entry

    For some reason when I try and edit an added task it always displays the first task I have entered into the db. This displays the first ever entered regardless of the item being completed or deleted. not seeing any errors or anything that would indicate why this is happening.

    opened by Haagimus 1
  • Suggestion, ability to assign tasks to others and see others tasks

    Suggestion, ability to assign tasks to others and see others tasks

    if permissions are given or in a set group. I would like to say, show my boss what i am working on so that they can choose what is a priority for me. Also this would work great with my kids so i can see what they are working on and if i need to prioritize something they missed or i forgot about.

    opened by K4N0 1
Releases(1.3)
  • 1.3(May 14, 2016)

  • v1.2(Feb 15, 2016)

  • 1.1(Nov 22, 2015)

    This release has everything, a unified look, notifications about actions, three modes, and a lot of bug fixes.

    Steps to use

    1. Unzip the folder
    2. Open the path in commandline
    3. do a ./Tasks
    4. open 127.0.0.1:8080 on your browser

    Made in India with :heart:

    Source code(tar.gz)
    Source code(zip)
    Tasks-Linux.zip(3.52 MB)
  • 1.0(Nov 17, 2015)

    This release is for Linux,

    Steps for usage:

    1. Download the release
    2. Unzip it to some path
    3. open terminal and go to the downloaded path
    4. do a ls, you should now see the Tasks binary file, run ./Tasks
    5. open chrome or firefox and go to 127.0.0.1:8080
    6. star and share the repo

    Made in India with :heart:

    Source code(tar.gz)
    Source code(zip)
    Tasks_1.0_Linux.zip(3.56 MB)
Owner
Suraj Patil
Go, Python, Statistical Learning
Suraj Patil
Generic-list-go - Go container/list but with generics

generic-list-go Go container/list but with generics. The code is based on contai

Arne Bahlo 7 Dec 7, 2022
Listmonk - a standalone, self-hosted, newsletter and mailing list manager

listmonk is a standalone, self-hosted, newsletter and mailing list manager. It is fast, feature-rich, and packed into a single binary. It uses a Postg

null 0 Jan 13, 2022
Coding assessment to create Todo app given by Percipia

Coding assessment to create Todo app given by Percipia

Anish 0 Oct 20, 2021
It is a basic todo app which has CRUD operation using Buffalo and golang

It is a basic todo app which has CRUD operation using Buffalo and golang

null 0 Nov 1, 2021
Mpq Decoder Golang TODO: MAke Description

MPQ MPQ archive codec Report Bug · Request Feature About This package provides a MPQ archive codec, for compressing and decompressing MoPaQ archives.

null 0 Nov 2, 2021
🕕Todo management through emails

??Todo management through emails

Changkun Ou 2 Nov 15, 2021
A session manager for tmux written in Go

Smug - tmux session manager Inspired by tmuxinator and tmuxp. Smug automates your tmux workflow. You can create a single configuration file, and Smug

Ivan 458 Jan 6, 2023
Functional programming library for Go including a lazy list implementation and some of the most usual functions.

functional A functional programming library including a lazy list implementation and some of the most usual functions. import FP "github.com/tcard/fun

Toni Cárdenas 31 May 21, 2022
CoreFoundation Property List support for Go

PACKAGE package plist import "github.com/kballard/go-osx-plist" Package plist implements serializing and deserializing of property list

Lily Ballard 29 Mar 18, 2022
Hack this repo and add your name to the list above. Creativity and style encouraged in both endeavors.

Hack this repo and add your name to the list above. Creativity and style encouraged in both endeavors.

Danger 2 Oct 1, 2021
Takes a list of poker hands for two players in STDIN and scores them

Poker Hand Sorter Takes a list of poker hands for two players in STDIN and scores them. Returns the number of hands won by each player. Prerequisites

Rylee 0 Jan 16, 2022
An application dedicated to the trivial and boring task of meal planning 📅 and generating shoppings list 🛒.

An application dedicated to the trivial and boring task of meal planning ?? and generating shoppings list ??.

Anders Wiggers 1 Mar 1, 2022
The package manager for macOS you didn’t know you missed. Simple, functional, and fast.

Stew The package manager for macOS you didn’t know you missed. Built with simplicity, functionality, and most importantly, speed in mind. Installation

Stew 20 Mar 30, 2022
gosignal is expected to be used in minimal window manager configurations

gosignal is expected to be used in minimal window manager configurations. It provides a simple battery monitor , which notifies of battery events. It has a config file where you can configure the notification messages given

pspiagicw 0 Mar 21, 2022
Random fake data generator written in go

Gofakeit Random data generator written in go Features 160+ Functions!!! Concurrent Global Rand Struct Generator Custom Functions Http Server Command L

Brian Voelker 2.8k Jan 1, 2023
Genetic Algorithm written in go

This genetic algorithm is designed to minimise the problem specific code from a genetic algorithm. The three interfaces Gene, Initialiser, an Evaluato

Robert Snipe 15 Feb 15, 2022
Simple and expressive toolbox written in Go

ugo Simple and expressive toolbox written with love and care in Go. Deeply inspired by underscore.js and has the same syntax and behaviour Fully cover

Alexey Derbyshev 27 Sep 27, 2022
An example client implementation written in GO to access the CyberVox platform API

About This is an example client implementation written in GO to access the CyberVox platform API.

Cyberlabs AI 15 Nov 7, 2022
💥 Fusion is a tiny stream processing library written in Go.

?? Fusion Fusion is a tiny stream processing library written in Go. See reactor for a stream processing tool built using fusion. Features Simple & lig

Shivaprasad Bhat 17 Jun 30, 2021